Skip to content

Commit e556cf2

Browse files
PMM-7470 Updated CI config
1 parent 49f5c95 commit e556cf2

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

.github/workflows/go.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ jobs:
5757
git clone --depth=1 https://go.googlesource.com/go $HOME/gotip
5858
cd $HOME/gotip/src
5959
./make.bash
60-
echo "::set-env name=GOROOT::$HOME/gotip"
61-
echo "::add-path::$HOME/gotip/bin"
60+
echo "GOROOT=$HOME/gotip" >> $GITHUB_ENV
61+
echo "$HOME/gotip/bin" >> $GITHUB_PATH
6262
6363
- name: Check out code into the Go module directory
6464
uses: actions/checkout@v2

main_test.go

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package main
2+
3+
import (
4+
"testing"
5+
6+
"github.com/stretchr/testify/assert"
7+
)
8+
9+
func TestBuildExporter(t *testing.T) {
10+
opts := GlobalFlags{
11+
CollStatsCollections: "c1,c2,c3",
12+
IndexStatsCollections: "i1,i2,i3",
13+
URI: "mongodb://usr:[email protected]/",
14+
GlobalConnPool: false, // to avoid testing the connection
15+
WebListenAddress: "localhost:12345",
16+
WebTelemetryPath: "/mymetrics",
17+
LogLevel: "debug",
18+
19+
DisableDiagnosticData: true,
20+
DisableReplicasetStatus: true,
21+
22+
CompatibleMode: true,
23+
}
24+
25+
_, err := buildExporter(opts)
26+
assert.NoError(t, err)
27+
}

0 commit comments

Comments
 (0)