revert log.Printf to t.Logf

This commit is contained in:
Ajitem Sahasrabuddhe 2019-12-06 10:13:18 +05:30
parent ccb0e89075
commit 1a724c9d6e
No known key found for this signature in database
GPG Key ID: 5B0EE10DAA76876C
2 changed files with 7 additions and 5 deletions

View File

@ -40,6 +40,7 @@ jobs:
run: | run: |
mkdir -p $GOPATH/bin mkdir -p $GOPATH/bin
curl -s https://api.github.com/repos/urfave/gfmrun/releases/latest | grep gfmrun-linux-amd64 | grep download | cut -d '"' -f 4 | wget -O $GOPATH/bin/gfmrun -i - curl -s https://api.github.com/repos/urfave/gfmrun/releases/latest | grep gfmrun-linux-amd64 | grep download | cut -d '"' -f 4 | wget -O $GOPATH/bin/gfmrun -i -
chmod +x $GOPATH/bin/gfmrun
npm install markdown-toc npm install markdown-toc
- name: Install Dependencies (Mac) - name: Install Dependencies (Mac)
@ -47,6 +48,7 @@ jobs:
run: | run: |
mkdir -p $GOPATH/bin mkdir -p $GOPATH/bin
curl -s https://api.github.com/repos/urfave/gfmrun/releases/latest | grep gfmrun-darwin-amd64 | grep download | cut -d '"' -f 4 | wget -O $GOPATH/bin/gfmrun -i - curl -s https://api.github.com/repos/urfave/gfmrun/releases/latest | grep gfmrun-darwin-amd64 | grep download | cut -d '"' -f 4 | wget -O $GOPATH/bin/gfmrun -i -
chmod +x $GOPATH/bin/gfmrun
npm install markdown-toc npm install markdown-toc
- name: Run Tests (v1) - name: Run Tests (v1)

View File

@ -1423,7 +1423,7 @@ func TestApp_Run_CommandWithSubcommandHasHelpTopic(t *testing.T) {
} }
for _, flagSet := range subcommandHelpTopics { for _, flagSet := range subcommandHelpTopics {
log.Printf("==> checking with flags %v", flagSet) t.Logf("==> checking with flags %v", flagSet)
app := &App{} app := &App{}
buf := new(bytes.Buffer) buf := new(bytes.Buffer)
@ -1613,7 +1613,7 @@ func TestApp_Run_Help(t *testing.T) {
for _, args := range helpArguments { for _, args := range helpArguments {
buf := new(bytes.Buffer) buf := new(bytes.Buffer)
log.Printf("==> checking with arguments %v", args) t.Logf("==> checking with arguments %v", args)
app := &App{ app := &App{
Name: "boom", Name: "boom",
@ -1631,7 +1631,7 @@ func TestApp_Run_Help(t *testing.T) {
} }
output := buf.String() output := buf.String()
log.Printf("output: %q\n", buf.Bytes()) t.Logf("output: %q\n", buf.Bytes())
if !strings.Contains(output, "boom - make an explosive entrance") { if !strings.Contains(output, "boom - make an explosive entrance") {
t.Errorf("want help to contain %q, did not: \n%q", "boom - make an explosive entrance", output) t.Errorf("want help to contain %q, did not: \n%q", "boom - make an explosive entrance", output)
@ -1645,7 +1645,7 @@ func TestApp_Run_Version(t *testing.T) {
for _, args := range versionArguments { for _, args := range versionArguments {
buf := new(bytes.Buffer) buf := new(bytes.Buffer)
log.Printf("==> checking with arguments %v", args) t.Logf("==> checking with arguments %v", args)
app := &App{ app := &App{
Name: "boom", Name: "boom",
@ -1664,7 +1664,7 @@ func TestApp_Run_Version(t *testing.T) {
} }
output := buf.String() output := buf.String()
log.Printf("output: %q\n", buf.Bytes()) t.Logf("output: %q\n", buf.Bytes())
if !strings.Contains(output, "0.1.0") { if !strings.Contains(output, "0.1.0") {
t.Errorf("want version to contain %q, did not: \n%q", "0.1.0", output) t.Errorf("want version to contain %q, did not: \n%q", "0.1.0", output)