fix test step
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
e3d2ba38a8
commit
823786c3ea
|
@ -11,7 +11,7 @@ steps:
|
||||||
- name: test
|
- name: test
|
||||||
image: golang
|
image: golang
|
||||||
commands:
|
commands:
|
||||||
- go test
|
- go test ./...
|
||||||
|
|
||||||
- name: scp
|
- name: scp
|
||||||
image: appleboy/drone-scp
|
image: appleboy/drone-scp
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
package calories
|
package calories
|
||||||
|
|
||||||
import "testing"
|
import (
|
||||||
|
"fmt"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
func TestCalcCalories(t *testing.T) {
|
func TestCalcCalories(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
@ -31,7 +34,7 @@ func TestCalcCalories(t *testing.T) {
|
||||||
{
|
{
|
||||||
"чай text",
|
"чай text",
|
||||||
"чай",
|
"чай",
|
||||||
39,
|
79,
|
||||||
false,
|
false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -46,6 +49,7 @@ func TestCalcCalories(t *testing.T) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if count != tt.want {
|
if count != tt.want {
|
||||||
|
fmt.Println(count, tt.want)
|
||||||
t.Errorf("error count: %v", err)
|
t.Errorf("error count: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue