Skip to content

Commit 02859b2

Browse files
authored
move hook and store test (cloudposse#1021)
1 parent 75f70b6 commit 02859b2

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

main_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,24 @@ func TestMainHooksAndStoreIntegration(t *testing.T) {
2121
if err != nil {
2222
t.Fatalf("failed to get current working directory: %v", err)
2323
}
24-
defer os.RemoveAll(path.Join(origDir, "testdata", "fixtures", "hooks-test", ".terraform"))
24+
defer os.RemoveAll(path.Join(origDir, "tests", "fixtures", "scenarios", "hooks-test", ".terraform"))
2525
defer os.Chdir(origDir)
2626

27-
if err := os.Chdir("testdata/fixtures/hooks-test"); err != nil {
27+
if err := os.Chdir("tests/fixtures/scenarios/hooks-test"); err != nil {
2828
t.Fatalf("failed to change directory: %v", err)
2929
}
3030

3131
// Capture the original arguments
3232
origArgs := os.Args
3333
defer func() { os.Args = origArgs }()
3434

35-
// Set the arguments for the first call to main() to deeploy the `random1` component, which uses a `hook` to set a
35+
// Set the arguments for the first call to main() to deploy the `component1` component, which uses a `hook` to set a
3636
// value in Redis
37-
os.Args = []string{"atmos", "terraform", "deploy", "random1", "-s", "test"}
37+
os.Args = []string{"atmos", "terraform", "deploy", "component1", "-s", "test"}
3838
main()
3939

40-
// Set the arguments for the second call to main() to deeploy the `random2` component, which uses a `store` to read a
40+
// Set the arguments for the second call to main() to deeploy the `component2` component, which uses a `store` to read a
4141
// value that was set in the first apply.
42-
os.Args = []string{"atmos", "terraform", "deploy", "random2", "-s", "test"}
42+
os.Args = []string{"atmos", "terraform", "deploy", "component2", "-s", "test"}
4343
main()
4444
}
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
components:
22
terraform:
3-
random1:
3+
component1:
44
metadata:
5-
component: random
5+
component: hook-and-store
66
hooks:
77
store-outputs:
88
events:
@@ -15,9 +15,9 @@ components:
1515
stage: test
1616
random: "random1"
1717

18-
random2:
18+
component2:
1919
metadata:
20-
component: random
20+
component: hook-and-store
2121
vars:
2222
stage: test
23-
random: !store testredis random1 random_id
23+
random: !store testredis component1 random_id

0 commit comments

Comments
 (0)