Skip to content

Commit 19006f3

Browse files
committed
add driver to tests
1 parent 149beed commit 19006f3

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

cmd/dbc/search.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ var (
1919
nameStyle = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("35"))
2020
descStyle = lipgloss.NewStyle().Italic(true)
2121
bold = lipgloss.NewStyle().Bold(true)
22-
23-
archStyle = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("5"))
2422
)
2523

2624
type SearchCmd struct {

cmd/dbc/search_test.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ func (suite *SubcommandTestSuite) TestSearchCmd() {
1414
downloadPkg: downloadTestPkg})
1515
suite.validateOutput("• test-driver-1 - This is a test driver\r\n"+
1616
"• test-driver-2 - This is another test driver\r\n"+
17-
"• test-driver-manifest-only - This is manifest-only driver\r\n\r ", suite.runCmd(m))
17+
"• test-driver-manifest-only - This is manifest-only driver\r\n"+
18+
"• test-driver-no-sig - Driver manifest missing Files.signature entry\r\n\r ", suite.runCmd(m))
1819
}
1920

2021
func (suite *SubcommandTestSuite) TestSearchCmdWithInstalled() {
@@ -26,7 +27,8 @@ func (suite *SubcommandTestSuite) TestSearchCmdWithInstalled() {
2627
baseModel{getDriverList: getTestDriverList,
2728
downloadPkg: downloadTestPkg})
2829
suite.validateOutput("• test-driver-1 - This is a test driver [installed: env=>1.1.0]\r\n"+
29-
"• test-driver-2 - This is another test driver\r\n• test-driver-manifest-only - This is manifest-only driver\r\n\r ", suite.runCmd(m))
30+
"• test-driver-2 - This is another test driver\r\n• test-driver-manifest-only - This is manifest-only driver\r\n"+
31+
"• test-driver-no-sig - Driver manifest missing Files.signature entry\r\n\r ", suite.runCmd(m))
3032
}
3133

3234
func (suite *SubcommandTestSuite) TestSearchCmdVerbose() {
@@ -41,6 +43,9 @@ func (suite *SubcommandTestSuite) TestSearchCmdVerbose() {
4143
"Available Versions:\r\n ├── 2.0.0\r\n ╰── 2.1.0\r\n"+
4244
"• test-driver-manifest-only\r\n Title: Test Driver Manifest Only\r\n "+
4345
"Description: This is manifest-only driver\r\n License: Apache-2.0\r\n "+
46+
"Available Versions:\r\n ╰── 1.0.0\r\n"+
47+
"• test-driver-no-sig\r\n Title: Test Driver No Signature\r\n "+
48+
"Description: Driver manifest missing Files.signature entry\r\n License: Apache-2.0\r\n "+
4449
"Available Versions:\r\n ╰── 1.0.0\r\n\r ", suite.runCmd(m))
4550
}
4651

@@ -64,5 +69,11 @@ func (suite *SubcommandTestSuite) TestSearchCmdVerboseWithInstalled() {
6469
" Description: This is manifest-only driver\r\n"+
6570
" License: Apache-2.0\r\n"+
6671
" Available Versions:\r\n"+
72+
" ╰── 1.0.0\r\n"+
73+
"• test-driver-no-sig\r\n"+
74+
" Title: Test Driver No Signature\r\n"+
75+
" Description: Driver manifest missing Files.signature entry\r\n"+
76+
" License: Apache-2.0\r\n"+
77+
" Available Versions:\r\n"+
6778
" ╰── 1.0.0\r\n\r ", suite.runCmd(m))
6879
}

0 commit comments

Comments
 (0)