Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions test/component_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/stretchr/testify/assert"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"

Expand Down Expand Up @@ -73,6 +74,10 @@ func (s *ComponentSuite) TestBasic() {
assert.NotNil(s.T(), metadata.Values)
assert.Equal(s.T(), metadata.Version, "0.8.3")

// Deploy second time to create ClusterSecretStore resource
options, _ = s.DeployAtmosComponent(s.T(), component, stack, &inputs)
assert.NotNil(s.T(), options)

config, err := awsHelper.NewK8SClientConfig(cluster)
assert.NoError(s.T(), err)
assert.NotNil(s.T(), config)
Expand Down Expand Up @@ -121,8 +126,7 @@ func (s *ComponentSuite) TestBasic() {
},
}


factory := dynamicinformer.NewDynamicSharedInformerFactory(dynamicClient, 0)
factory := dynamicinformer.NewFilteredDynamicSharedInformerFactory(dynamicClient, time.Minute, corev1.NamespaceAll, nil)
informer := factory.ForResource(externalSecretGVR).Informer()

stopChannel := make(chan struct{})
Expand All @@ -136,6 +140,7 @@ func (s *ComponentSuite) TestBasic() {
return
}

// Ensure we are checking the status of the correct object
conditions, found, err := unstructured.NestedSlice(externalSecret.Object, "status", "conditions")

if err != nil || !found {
Expand Down Expand Up @@ -171,6 +176,7 @@ func (s *ComponentSuite) TestBasic() {
msg := "ExternalSecret is ready"
fmt.Println(msg)
case <-time.After(1 * time.Minute):
defer close(stopChannel)
msg := "ExternalSecret is not ready"
assert.Fail(s.T(), msg)
}
Expand Down
3 changes: 0 additions & 3 deletions test/fixtures/stacks/orgs/default/test/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@ import:
- orgs/default/test/_defaults
- catalog/vpc
- catalog/eks-cluster
- catalog/dns-primary
- catalog/dns-delegated
- catalog/eks-alb-controller
- catalog/usecase/basic
- catalog/usecase/disabled