-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: improve fixture based testing
- Loading branch information
Showing
15 changed files
with
560 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package health_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/bmatcuk/doublestar/v4" | ||
) | ||
|
||
func TestFixtures(t *testing.T) { | ||
files, err := doublestar.FilepathGlob("testdata/*/**/*.yaml") | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
if len(files) == 0 { | ||
t.Fatal("no test files found") | ||
} | ||
|
||
for _, file := range files { | ||
testFixture(t, file) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CreationTime: "2023-05-09T03:59:08.629Z" | ||
DriftInformation: | ||
StackDriftStatus: NOT_CHECKED | ||
StackId: arn:aws:cloudformation:eu-west-1:765618022540:stack/eksctl-mission-control-demo-cluster-addon-iamserviceaccount-kube-system-cluster-autoscaler/d94c1e20-ee1d-11ed-857e-0a810473a089 | ||
StackName: eksctl-mission-control-demo-cluster-addon-iamserviceaccount-kube-system-cluster-autoscaler | ||
StackStatus: CREATE_COMPLETE | ||
TemplateDescription: IAM role for serviceaccount | ||
"kube-system/cluster-autoscaler" [created and managed by eksctl] |
10 changes: 10 additions & 0 deletions
10
pkg/health/testdata/AWS/Cloudformation/Stack/unhealthy.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
annotations: | ||
message: 'The following resource(s) failed to create: [ECSCluster].' | ||
CreationTime: 2024-06-27T14:23:12.654Z | ||
DriftInformation: | ||
StackDriftStatus: NOT_CHECKED | ||
StackId: arn:aws:cloudformation:eu-west-1:765618022540:stack/Infra-ECS-Cluster-test-aditya-d2231163/c91bc4f0-3490-11ef-ba04-0267adf9bc1d | ||
StackName: Infra-ECS-Cluster-test-aditya-d2231163 | ||
StackStatus: CREATE_FAILED | ||
StackStatusReason: "The following resource(s) failed to create: [ECSCluster]. " | ||
TemplateDescription: The template used to create an ECS Cluster from the ECS Console. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ActiveServicesCount: 1 | ||
Attachments: [] | ||
CapacityProviders: [] | ||
ClusterArn: arn:aws:ecs:eu-west-1:765618022540:cluster/demo-dev-cluster | ||
ClusterName: demo-dev-cluster | ||
DefaultCapacityProviderStrategy: [] | ||
PendingTasksCount: 0 | ||
RegisteredContainerInstancesCount: 0 | ||
RunningTasksCount: 1 | ||
Settings: [] | ||
Statistics: [] | ||
Status: ACTIVE | ||
Tags: [] |
Oops, something went wrong.