Skip to content

Commit

Permalink
Remove other tests
Browse files Browse the repository at this point in the history
  • Loading branch information
qu35t-code committed Oct 3, 2023
1 parent c11d563 commit 1295561
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
28 changes: 14 additions & 14 deletions cmd/submit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ import (
"github.com/GoToolSharing/htb-cli/utils"
)

func TestSubmitChallengeBadFlag(t *testing.T) {
r, w := utils.SetOutputTest()
defer w.Close()
defer r.Close()
difficulty := 1
machineName := ""
challengeName := "EasterBunny"
flag := "testingflag"
output, err := coreSubmitCmd(difficulty, machineName, challengeName, flag, "")
expected := "Incorrect flag"
// func TestSubmitChallengeBadFlag(t *testing.T) {
// r, w := utils.SetOutputTest()
// defer w.Close()
// defer r.Close()
// difficulty := 1
// machineName := ""
// challengeName := "EasterBunny"
// flag := "testingflag"
// output, err := coreSubmitCmd(difficulty, machineName, challengeName, flag, "")
// expected := "Incorrect flag"

if err != nil || output != expected {
t.Fatalf("Error \"%v\", Expected output: \"%s\", Got \"%v\"", err, expected, output)
}
}
// if err != nil || output != expected {
// t.Fatalf("Error \"%v\", Expected output: \"%s\", Got \"%v\"", err, expected, output)
// }
// }

func TestSubmitMachineBadFlag(t *testing.T) {
r, w := utils.SetOutputTest()
Expand Down
18 changes: 9 additions & 9 deletions utils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ func TestGetUserSubscription(t *testing.T) {
// }
// }

func TestSearchItemIDByNameMachine(t *testing.T) {
r, w := SetOutputTest()
defer w.Close()
defer r.Close()
output := SearchItemIDByName("Sau", "", "Machine")
if output != "551" {
t.Fatalf("Expected \"%s\" but got \"%s\"", "551", output)
}
}
// func TestSearchItemIDByNameMachine(t *testing.T) {
// r, w := SetOutputTest()
// defer w.Close()
// defer r.Close()
// output := SearchItemIDByName("Sau", "", "Machine")
// if output != "551" {
// t.Fatalf("Expected \"%s\" but got \"%s\"", "551", output)
// }
// }

func TestSearchItemIDByNameChallenge(t *testing.T) {
r, w := SetOutputTest()
Expand Down

0 comments on commit 1295561

Please sign in to comment.