test(host): update e2e testing to support shared test enviro creds (#69)
This commit is contained in:
1 parent
5b7b669b41
commit
56f89a5dcf
4 files changed
+96
-48
No files matched your search
@@ -22,8 +22,6 @@ import (
|
||||
|
||||
const expectedEc2InstanceCount = 5
|
||||
|
||||
var expectedTags = []string{"foo", "bar", "baz"}
|
||||
|
||||
func TestHostPlugin(t *testing.T) {
|
||||
region := os.Getenv("AWS_REGION")
|
||||
if region == "" {
|
||||
@@ -80,6 +78,14 @@ func TestHostPlugin(t *testing.T) {
|
||||
require.NoError(err)
|
||||
require.Len(ec2InstanceTags, expectedEc2InstanceCount)
|
||||
|
||||
rawExpectedTags, err := tf.GetOutputSlice("instance_tag_keys")
|
||||
require.NoError(err)
|
||||
require.Len(rawExpectedTags, 3)
|
||||
expectedTags := make([]string, 0, len(rawExpectedTags))
|
||||
for _, rawExpectedTag := range rawExpectedTags {
|
||||
expectedTags = append(expectedTags, rawExpectedTag.(string))
|
||||
}
|
||||
|
||||
// Start the workflow now. Set up the host catalog. Note that this
|
||||
// will cause the state to go out of drift above in the sense that
|
||||
// the access key ID/secret access key will no longer be valid. We
|
||||
@@ -143,13 +149,13 @@ func TestHostPlugin(t *testing.T) {
|
||||
}
|
||||
|
||||
cases := [][]string{
|
||||
{"foo"},
|
||||
{"bar"},
|
||||
{"baz"},
|
||||
{"foo", "bar"},
|
||||
{"foo", "baz"},
|
||||
{"bar", "baz"},
|
||||
{"foo", "bar", "baz"},
|
||||
{expectedTags[0]},
|
||||
{expectedTags[1]},
|
||||
{expectedTags[2]},
|
||||
{expectedTags[0], expectedTags[1]},
|
||||
{expectedTags[0], expectedTags[2]},
|
||||
{expectedTags[1], expectedTags[2]},
|
||||
{expectedTags[0], expectedTags[1], expectedTags[2]},
|
||||
}
|
||||
|
||||
for _, tc := range cases {
|
||||
|
||||
Reference in new issue
Block a user