Skip to content

Commit

Permalink
feat(cli): unhiding query "sources" cmd
Browse files Browse the repository at this point in the history
Unhides lacework query list-sources
Unhides lacework query show-source
Enables integration testing

ALLY-704
  • Loading branch information
hazedav authored Oct 20, 2021
1 parent eab94cf commit 4e2513f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
4 changes: 2 additions & 2 deletions cli/cmd/lql_sources.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

var (
queryListSourcesCmd = &cobra.Command{
Hidden: true, // api to be exposed for 4.31
Hidden: false,
Aliases: []string{"sources"},
Use: "list-sources",
Short: "list Lacework query data sources",
Expand All @@ -37,7 +37,7 @@ var (
}

queryShowSourceCmd = &cobra.Command{
Hidden: true, // api to be exposed for 4.31
Hidden: false,
Aliases: []string{"describe"},
Use: "show-source <datasource_id>",
Short: "show Lacework query data source",
Expand Down
8 changes: 0 additions & 8 deletions integration/lql_sources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ func TestQueryListSourcesAliases(t *testing.T) {
}

func TestQueryListSourcesTable(t *testing.T) {
t.Skip("skipping test due to unavailable api")

out, err, exitcode := LaceworkCLIWithTOMLConfig("query", "sources")
assert.Contains(t, out.String(), "DATASOURCE")
assert.Contains(t, out.String(), "CloudTrailRawEvents")
Expand All @@ -50,8 +48,6 @@ func TestQueryListSourcesTable(t *testing.T) {
}

func TestQueryListSourcesJSON(t *testing.T) {
t.Skip("skipping test due to unavailable api")

out, err, exitcode := LaceworkCLIWithTOMLConfig("query", "sources", "--json")
assert.Contains(t, out.String(), "[")
assert.Contains(t, out.String(), `"CloudTrailRawEvents"`)
Expand Down Expand Up @@ -80,8 +76,6 @@ func TestQueryShowSourceNoInput(t *testing.T) {
}

func TestQueryShowSourceTable(t *testing.T) {
t.Skip("skipping test due to unavailable api")

out, err, exitcode := LaceworkCLIWithTOMLConfig("query", "describe", "CloudTrailRawEvents")
assert.Contains(t, out.String(), "FIELD NAME")
assert.Contains(t, out.String(), "INSERT_ID")
Expand All @@ -90,8 +84,6 @@ func TestQueryShowSourceTable(t *testing.T) {
}

func TestQueryShowSourceJSON(t *testing.T) {
t.Skip("skipping test due to unavailable api")

out, err, exitcode := LaceworkCLIWithTOMLConfig("query", "describe", "CloudTrailRawEvents", "--json")
assert.Contains(t, out.String(), `"INSERT_ID"`)
assert.Empty(t, err.String(), "STDERR should be empty")
Expand Down

0 comments on commit 4e2513f

Please sign in to comment.