Skip to content

Commit 1f88753

Browse files
committed
fix: correct compilation for unit tests
1 parent 5c92f92 commit 1f88753

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sysdig/internal/client/v2/ibm_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func TestIBMClient_DoIBMRequest(t *testing.T) {
3535
token := "token"
3636
iamEndpointCalled := 0
3737
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
38-
if r.URL.Path == IBMIAMPath {
38+
if r.URL.Path == ibmIAMPath {
3939
iamEndpointCalled++
4040
data, err := json.Marshal(IAMTokenResponse{
4141
AccessToken: token,
@@ -55,7 +55,7 @@ func TestIBMClient_DoIBMRequest(t *testing.T) {
5555
if value := r.Header.Get(AuthorizationHeader); value != fmt.Sprintf("Bearer %s", token) {
5656
t.Errorf("invalid authorization header, %v", value)
5757
}
58-
if value := r.Header.Get(IBMInstanceIDHeader); value != instanceID {
58+
if value := r.Header.Get(ibmInstanceIDHeader); value != instanceID {
5959
t.Errorf("expected instance id %v, got %v", instanceID, value)
6060
}
6161
if value := r.Header.Get(SysdigProviderHeader); value != SysdigProviderHeaderValue {
@@ -138,14 +138,14 @@ func TestIBMClient_CurrentTeamID(t *testing.T) {
138138
var data []byte
139139

140140
switch r.URL.Path {
141-
case fmt.Sprintf("%steam", GetTeamByNamePath):
141+
case fmt.Sprintf("%steam", getTeamByNamePath):
142142
data, err = json.Marshal(teamWrapper{Team: Team{
143143
ID: teamID3,
144144
}})
145145
if err != nil {
146146
t.Errorf("failed to create team response, err: %v", err)
147147
}
148-
case IBMIAMPath:
148+
case ibmIAMPath:
149149
data, err = json.Marshal(IAMTokenResponse{
150150
AccessToken: token,
151151
Expiration: time.Now().Add(time.Hour).Unix(),

0 commit comments

Comments
 (0)