Skip to content

Commit

Permalink
test: old test
Browse files Browse the repository at this point in the history
  • Loading branch information
ishandhanani committed Sep 23, 2024
1 parent 282fabd commit c3c8f92
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions pkg/store/workspace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,31 +423,31 @@ func TestDeleteWorkspace(t *testing.T) { //nolint:dupl // ok to have this be dup
}
}

func TestValidateOllamaModel(t *testing.T) {
type args struct {
model string
tag string
}
tests := []struct {
name string
args args
want bool
wantErr bool
}{
{"empty", args{"", ""}, false, false},
{"llama3", args{"llama3", ""}, true, false},
{"llama3:80b", args{"llama3", "80b"}, false, false},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := ValidateOllamaModel(tt.args.model, tt.args.tag)
if (err != nil) != tt.wantErr {
t.Errorf("ValidateOllamaModel() error = %v, wantErr %v", err, tt.wantErr)
return
}
if got != tt.want {
t.Errorf("ValidateOllamaModel() = %v, want %v", got, tt.want)
}
})
}
}
// func TestValidateOllamaModel(t *testing.T) {
// type args struct {
// model string
// tag string
// }
// tests := []struct {
// name string
// args args
// want bool
// wantErr bool
// }{
// {"empty", args{"", ""}, false, false},
// {"llama3", args{"llama3", ""}, true, false},
// {"llama3:80b", args{"llama3", "80b"}, false, false},
// }
// for _, tt := range tests {
// t.Run(tt.name, func(t *testing.T) {
// got, err := ValidateOllamaModel(tt.args.model, tt.args.tag)
// if (err != nil) != tt.wantErr {
// t.Errorf("ValidateOllamaModel() error = %v, wantErr %v", err, tt.wantErr)
// return
// }
// if got != tt.want {
// t.Errorf("ValidateOllamaModel() = %v, want %v", got, tt.want)
// }
// })
// }
// }

0 comments on commit c3c8f92

Please sign in to comment.