Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix tests and remove extra docker login in release.yml #1569

Merged
merged 4 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ jobs:
with:
go-version: 1.21.x

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -60,6 +54,7 @@ jobs:
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GITHUB_TOKEN: ${{ secrets.TOKEN }}
CI: true
run: |
make prepare
echo "$GPG_SECRET_KEY" | base64 --decode | gpg --import --no-tty --batch --yes
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

- name: Notify Slack on Failure
uses: slackapi/slack-github-action@v1.25.0
if: failure()
if: failure() && github.event_name != 'pull_request'
with:
payload: |
{
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:

- name: Notify Slack on Failure
uses: slackapi/slack-github-action@v1.25.0
if: failure()
if: failure() && github.event_name != 'pull_request'
with:
payload: |
{
Expand Down
22 changes: 5 additions & 17 deletions integration/lql_create_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ func TestQueryCreateFromEditor(t *testing.T) {
c.Send(fmt.Sprintf("c$queryId: %s\x1b", queryID))
time.Sleep(time.Millisecond)
// Move to line number 5 and add source
c.Send("5GoCloudTrailRawEvents\x1b")
c.Send("5Gc$CloudTrailRawEvents\x1b")
time.Sleep(time.Millisecond)
// Move to line number 9 and add filter
c.Send("9GoEVENT_NAME like 'GetBucket%'\x1b")
// Move to line number 8 and add filter
c.Send("8Gc$EVENT_NAME like 'GetBucket%'\x1b")
time.Sleep(time.Millisecond)
// Move to line number 13 and add return
c.Send("13GoINSERT_ID\x1b")
// Move to line number 11 and add return
c.Send("11Gc$INSERT_ID\x1b")
time.Sleep(time.Millisecond)
c.SendLine(":wq!") // save and close
time.Sleep(time.Millisecond)
Expand All @@ -69,18 +69,6 @@ func TestQueryCreateFromEditor(t *testing.T) {
assert.Empty(t,
stderr.String(),
"STDERR should be empty")
assert.Contains(t,
stdout.String(),
"--- Select a datasource. To list all available datasources, use 'lacework query sources'.",
"STDOUT changed, please update")
assert.Contains(t,
stdout.String(),
"--- Add query filter(s), if any. If not, remove this block.",
"STDOUT changed, please update")
assert.Contains(t,
stdout.String(),
"--- List fields to return from the selected source. Use 'lacework query describe <datasource>'.",
"STDOUT changed, please update")
assert.Contains(t, stdout.String(), "CloudTrailRawEvents", "STDOUT changed, please update")
assert.Contains(t, stdout.String(), "EVENT_NAME like 'GetBucket%'", "STDOUT changed, please update")
assert.Contains(t, stdout.String(), "INSERT_ID", "STDOUT changed, please update")
Expand Down
2 changes: 1 addition & 1 deletion integration/lql_update_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestQueryUpdateFromIDEditor(t *testing.T) {
c.SendLine("")
time.Sleep(time.Millisecond)
// Move to line number 4 and add comment "--- Updated from CLI Editor"
c.Send("4Go--- Updated from CLI Editor\x1b")
c.Send("4Gc$--- Updated from CLI Editor\x1b")
c.SendLine(":wq!") // save and close
time.Sleep(time.Millisecond)
expectString(t, c,
Expand Down
Loading