-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* INTG-2181 changed the busy timeout and limited the concurrent go-routines to 10 * INTG-2181 more tests * INTG-2181 adding comments * INTG-2181 more tests on API
- Loading branch information
1 parent
dd85b71
commit 2e940ec
Showing
15 changed files
with
314 additions
and
334 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
cmd/iauditor-exporter/cmd/configure_test.go → ...-exporter/cmd/configure/configure_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package cmd_test | ||
package configure_test | ||
|
||
import ( | ||
"bytes" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package export_test | ||
|
||
import ( | ||
"github.com/SafetyCulture/iauditor-exporter/cmd/iauditor-exporter/cmd/export" | ||
"github.com/stretchr/testify/assert" | ||
"github.com/stretchr/testify/require" | ||
"testing" | ||
) | ||
|
||
func TestPrintSchemaCmd(t *testing.T) { | ||
res := export.PrintSchemaCmd() | ||
require.NotNil(t, res) | ||
assert.EqualValues(t, "schema", res.Use) | ||
assert.EqualValues(t, "Print iAuditor table schemas", res.Short) | ||
assert.EqualValues(t, "iauditor-exporter schema", res.Example) | ||
} | ||
|
||
func TestReportCmd(t *testing.T) { | ||
res := export.ReportCmd() | ||
require.NotNil(t, res) | ||
assert.EqualValues(t, "report", res.Use) | ||
assert.EqualValues(t, "Export inspection report", res.Short) | ||
} | ||
|
||
func TestInspectionJSONCmd(t *testing.T) { | ||
res := export.InspectionJSONCmd() | ||
require.NotNil(t, res) | ||
assert.EqualValues(t, "inspection-json", res.Use) | ||
assert.EqualValues(t, "Export iAuditor inspections to json files", res.Short) | ||
} | ||
|
||
func TestCSVCmd(t *testing.T) { | ||
res := export.CSVCmd() | ||
require.NotNil(t, res) | ||
assert.EqualValues(t, "csv", res.Use) | ||
assert.EqualValues(t, "Export iAuditor data to CSV files", res.Short) | ||
} | ||
|
||
func TestSQLCmd(t *testing.T) { | ||
res := export.SQLCmd() | ||
require.NotNil(t, res) | ||
assert.EqualValues(t, "sql", res.Use) | ||
assert.EqualValues(t, "Export iAuditor data to SQL database", res.Short) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.