Skip to content

Commit

Permalink
Merge pull request #70 from codecrafters-io/update-course-stage-slug
Browse files Browse the repository at this point in the history
CC-1227 update course stage slug
  • Loading branch information
libmartinito authored May 17, 2024
2 parents d07c426 + c05b24d commit 2c2ee5f
Show file tree
Hide file tree
Showing 16 changed files with 668 additions and 167 deletions.
26 changes: 13 additions & 13 deletions internal/stages_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,91 +12,91 @@ func TestStages(t *testing.T) {

testCases := map[string]tester_utils_testing.TesterOutputTestCase{
"init_success": {
UntilStageSlug: "init",
UntilStageSlug: "gg4",
CodePath: "./test_helpers/stages/init",
ExpectedExitCode: 0,
StdoutFixturePath: "./test_helpers/fixtures/init",
NormalizeOutputFunc: normalizeTesterOutput,
},
"init_main": {
UntilStageSlug: "init",
UntilStageSlug: "gg4",
CodePath: "./test_helpers/stages/init_main",
ExpectedExitCode: 0,
StdoutFixturePath: "./test_helpers/fixtures/init_main",
NormalizeOutputFunc: normalizeTesterOutput,
},
"init_failure": {
UntilStageSlug: "init",
UntilStageSlug: "gg4",
CodePath: "./test_helpers/stages/init_failure",
ExpectedExitCode: 1,
StdoutFixturePath: "./test_helpers/fixtures/init_failure",
NormalizeOutputFunc: normalizeTesterOutput,
},
"read_blob_success": {
UntilStageSlug: "read_blob",
UntilStageSlug: "ic4",
CodePath: "./test_helpers/stages/read_blob",
ExpectedExitCode: 0,
StdoutFixturePath: "./test_helpers/fixtures/read_blob",
NormalizeOutputFunc: normalizeTesterOutput,
},
"create_blob_failure": {
UntilStageSlug: "create_blob",
UntilStageSlug: "jt4",
CodePath: "./test_helpers/stages/create_blob_failure",
ExpectedExitCode: 1,
StdoutFixturePath: "./test_helpers/fixtures/create_blob_failure",
NormalizeOutputFunc: normalizeTesterOutput,
},
"create_blob_no_file": {
UntilStageSlug: "create_blob",
UntilStageSlug: "jt4",
CodePath: "./test_helpers/stages/create_blob_no_file",
ExpectedExitCode: 1,
StdoutFixturePath: "./test_helpers/fixtures/create_blob_no_file",
NormalizeOutputFunc: normalizeTesterOutput,
},
"create_blob_no_zlib": {
UntilStageSlug: "create_blob",
UntilStageSlug: "jt4",
CodePath: "./test_helpers/stages/create_blob_no_zlib",
ExpectedExitCode: 1,
StdoutFixturePath: "./test_helpers/fixtures/create_blob_no_zlib",
NormalizeOutputFunc: normalizeTesterOutput,
},
"create_blob_success": {
UntilStageSlug: "create_blob",
UntilStageSlug: "jt4",
CodePath: "./test_helpers/stages/create_blob",
ExpectedExitCode: 0,
StdoutFixturePath: "./test_helpers/fixtures/create_blob",
NormalizeOutputFunc: normalizeTesterOutput,
},
"read_tree_success": {
UntilStageSlug: "read_tree",
UntilStageSlug: "kp1",
CodePath: "./test_helpers/stages/read_tree",
ExpectedExitCode: 0,
StdoutFixturePath: "./test_helpers/fixtures/read_tree",
NormalizeOutputFunc: normalizeTesterOutput,
},
"read_tree_exit_code_failure": {
UntilStageSlug: "read_tree",
UntilStageSlug: "kp1",
CodePath: "./test_helpers/stages/read_tree_exit_code_failure",
ExpectedExitCode: 1,
StdoutFixturePath: "./test_helpers/fixtures/read_tree_exit_code_failure",
NormalizeOutputFunc: normalizeTesterOutput,
},
"write_tree_failure": {
UntilStageSlug: "write_tree",
UntilStageSlug: "fe4",
CodePath: "./test_helpers/stages/write_tree_fail",
ExpectedExitCode: 1,
StdoutFixturePath: "./test_helpers/fixtures/write_tree_fail",
NormalizeOutputFunc: normalizeTesterOutput,
},
"write_tree_err_not_exist_failure": {
UntilStageSlug: "write_tree",
UntilStageSlug: "fe4",
CodePath: "./test_helpers/stages/write_tree_err_not_exist_fail",
ExpectedExitCode: 1,
StdoutFixturePath: "./test_helpers/fixtures/write_tree_err_not_exist_fail",
NormalizeOutputFunc: normalizeTesterOutput,
},
"write_tree_success": {
UntilStageSlug: "write_tree",
UntilStageSlug: "fe4",
CodePath: "./test_helpers/stages/write_tree",
ExpectedExitCode: 0,
StdoutFixturePath: "./test_helpers/fixtures/write_tree",
Expand Down
Loading

0 comments on commit 2c2ee5f

Please sign in to comment.