Skip to content

Commit

Permalink
test: update ai:models:attach tests
Browse files Browse the repository at this point in the history
  • Loading branch information
k80bowman committed Nov 27, 2024
1 parent 4e08e9a commit f44d352
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions test/commands/ai/models/attach.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ describe('ai:models:attach', function () {
process.env = {}
sandbox = sinon.createSandbox()
api = nock('https://api.heroku.com:443')
.post('/actions/addons/resolve', {addon: addon3.name, app: null})
.reply(200, [addon3])
.post('/actions/addon-attachments/resolve', {addon_attachment: addon3.name, app: null})
.post('/actions/addon-attachments/resolve', {addon_attachment: addon3.name, app: 'app1'})
.reply(200, [addon3Attachment1])
.get(`/apps/${addon3.app?.id}/addons/${addon3.id}`)
.reply(200, addon3)
.get(`/apps/${addon3Attachment1.app?.id}/config-vars`)
.reply(200, {
INFERENCE_MAROON_KEY: 's3cr3t_k3y',
Expand All @@ -48,7 +48,8 @@ describe('ai:models:attach', function () {

await runCommand(Cmd, [
'inference-animate-91825',
'--app=app2',
'--target-app=app2',
'--source-app=app1',
])

expect(stdout.output).to.eq('')
Expand Down Expand Up @@ -78,7 +79,8 @@ describe('ai:models:attach', function () {

await runCommand(Cmd, [
'inference-animate-91825',
'--app=app2',
'--target-app=app2',
'--source-app=app1',
'--as=CLAUDE_SONNET',
])

Expand Down Expand Up @@ -120,7 +122,8 @@ describe('ai:models:attach', function () {

await runCommand(Cmd, [
'inference-animate-91825',
'--app=app2',
'--target-app=app2',
'--source-app=app1',
'--as=CLAUDE_SONNET',
])

Expand Down Expand Up @@ -155,7 +158,8 @@ describe('ai:models:attach', function () {

await runCommand(Cmd, [
'inference-animate-91825',
'--app=app2',
'--target-app=app2',
'--source-app=app1',
'--as=CLAUDE_SONNET',
'--confirm=app2',
])
Expand Down Expand Up @@ -188,7 +192,8 @@ describe('ai:models:attach', function () {
try {
await runCommand(Cmd, [
'inference-animate-91825',
'--app=app2',
'--target-app=app2',
'--source-app=app1',
'--as=CLAUDE_SONNET',
])
} catch (error: unknown) {
Expand Down Expand Up @@ -218,7 +223,8 @@ describe('ai:models:attach', function () {
try {
await runCommand(Cmd, [
'inference-animate-91825',
'--app=app2',
'--target-app=app2',
'--source-app=app1',
'--as=CLAUDE_SONNET',
'--confirm=wrong-app-name',
])
Expand Down Expand Up @@ -249,7 +255,8 @@ describe('ai:models:attach', function () {
try {
await runCommand(Cmd, [
'inference-animate-91825',
'--app=app2',
'--target-app=app2',
'--source-app=app1',
'--as=wrong-alias',
])
} catch (error: unknown) {
Expand Down

0 comments on commit f44d352

Please sign in to comment.