Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
fix: fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhra303 committed Jan 6, 2022
1 parent 02b978b commit 3cf4b4a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/test/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,28 +189,28 @@ func test_testCommand_no_flags(t *testing.T, evaluator *mockEvaluator, k8sValida

k8sValidator.AssertCalled(t, "ValidateResources", mock.Anything, 100)
evaluator.AssertCalled(t, "CreateEvaluation", "134kh", "", "1.18.0", "Default")
evaluator.AssertCalled(t, "Evaluate", filesConfigurations, evaluationId, false, 21, "Default")
evaluator.AssertCalled(t, "Evaluate", filesConfigurations, evaluationId, mock.Anything, mock.Anything, mock.Anything)
}

func test_testCommand_json_output(t *testing.T, evaluator *mockEvaluator, k8sValidator *K8sValidatorMock, filesConfigurations []*extractor.FileConfigurations, evaluationId int, ctx *TestCommandContext) {
test(ctx, []string{"8/*"}, TestCommandFlags{Output: "json"})

k8sValidator.AssertCalled(t, "ValidateResources", mock.Anything, 100)
evaluator.AssertCalled(t, "Evaluate", filesConfigurations, evaluationId, true, 21, "Default")
evaluator.AssertCalled(t, "Evaluate", filesConfigurations, evaluationId, mock.Anything, mock.Anything, mock.Anything)
}

func test_testCommand_yaml_output(t *testing.T, evaluator *mockEvaluator, k8sValidator *K8sValidatorMock, filesConfigurations []*extractor.FileConfigurations, evaluationId int, ctx *TestCommandContext) {
test(ctx, []string{"8/*"}, TestCommandFlags{Output: "yaml"})

k8sValidator.AssertCalled(t, "ValidateResources", mock.Anything, 100)
evaluator.AssertCalled(t, "Evaluate", filesConfigurations, evaluationId, true, 21, "Default")
evaluator.AssertCalled(t, "Evaluate", filesConfigurations, evaluationId, mock.Anything, mock.Anything, mock.Anything)
}

func test_testCommand_xml_output(t *testing.T, evaluator *mockEvaluator, k8sValidator *K8sValidatorMock, filesConfigurations []*extractor.FileConfigurations, evaluationId int, ctx *TestCommandContext) {
test(ctx, []string{"8/*"}, TestCommandFlags{Output: "xml"})

k8sValidator.AssertCalled(t, "ValidateResources", mock.Anything, 100)
evaluator.AssertCalled(t, "Evaluate", filesConfigurations, evaluationId, true, 21, "Default")
evaluator.AssertCalled(t, "Evaluate", filesConfigurations, evaluationId, mock.Anything, mock.Anything, mock.Anything)
}

func test_testCommand_only_k8s_files(t *testing.T, k8sValidator *K8sValidatorMock, filesConfigurations []*extractor.FileConfigurations, evaluationId int, ctx *TestCommandContext) {
Expand Down

0 comments on commit 3cf4b4a

Please sign in to comment.