@@ -12,6 +12,7 @@ import (
1212 "github.com/stretchr/testify/require"
1313
1414 "github.com/e2b-dev/infra/packages/shared/pkg/keys"
15+ sharedUtils "github.com/e2b-dev/infra/packages/shared/pkg/utils"
1516 envdapi "github.com/e2b-dev/infra/tests/integration/internal/envd/api"
1617 "github.com/e2b-dev/infra/tests/integration/internal/setup"
1718 "github.com/e2b-dev/infra/tests/integration/internal/utils"
@@ -32,7 +33,7 @@ func TestDownloadFileWhenAuthIsDisabled(t *testing.T) {
3233 ctx ,
3334 & envdapi.PostFilesParams {
3435 Path : & filePath ,
35- Username : "user" ,
36+ Username : sharedUtils . ToPtr ( "user" ) ,
3637 },
3738 contentType ,
3839 textFile ,
@@ -44,7 +45,7 @@ func TestDownloadFileWhenAuthIsDisabled(t *testing.T) {
4445
4546 getRes , err := envdClient .HTTPClient .GetFilesWithResponse (
4647 ctx ,
47- & envdapi.GetFilesParams {Path : & filePath , Username : "user" },
48+ & envdapi.GetFilesParams {Path : & filePath , Username : sharedUtils . ToPtr ( "user" ) },
4849 setup .WithSandbox (sbx .JSON201 .SandboxID ),
4950 )
5051
@@ -72,7 +73,7 @@ func TestDownloadFileWithoutSigningWhenAuthIsEnabled(t *testing.T) {
7273 ctx ,
7374 & envdapi.PostFilesParams {
7475 Path : & filePath ,
75- Username : "user" ,
76+ Username : sharedUtils . ToPtr ( "user" ) ,
7677 Signature : & writeFileSigning ,
7778 },
7879 contentType ,
@@ -86,7 +87,7 @@ func TestDownloadFileWithoutSigningWhenAuthIsEnabled(t *testing.T) {
8687
8788 readRes , readErr := envdClient .HTTPClient .GetFiles (
8889 ctx ,
89- & envdapi.GetFilesParams {Path : & filePath , Username : "user" },
90+ & envdapi.GetFilesParams {Path : & filePath , Username : sharedUtils . ToPtr ( "user" ) },
9091 setup .WithSandbox (sbx .JSON201 .SandboxID ),
9192 )
9293 require .NoError (t , readErr )
@@ -115,7 +116,7 @@ func TestDownloadFileWithSigningWhenAuthIsEnabled(t *testing.T) {
115116 ctx ,
116117 & envdapi.PostFilesParams {
117118 Path : & filePath ,
118- Username : "user" ,
119+ Username : sharedUtils . ToPtr ( "user" ) ,
119120 Signature : & writeFileSigning ,
120121 },
121122 contentType ,
@@ -128,7 +129,7 @@ func TestDownloadFileWithSigningWhenAuthIsEnabled(t *testing.T) {
128129
129130 readRes , readErr := envdClient .HTTPClient .GetFilesWithResponse (
130131 ctx ,
131- & envdapi.GetFilesParams {Path : & filePath , Username : "user" , Signature : & readFileSigning },
132+ & envdapi.GetFilesParams {Path : & filePath , Username : sharedUtils . ToPtr ( "user" ) , Signature : & readFileSigning },
132133 setup .WithSandbox (sbx .JSON201 .SandboxID ),
133134 )
134135
@@ -158,7 +159,7 @@ func TestDownloadWithAlreadyExpiredToken(t *testing.T) {
158159 ctx ,
159160 & envdapi.GetFilesParams {
160161 Path : & filePath ,
161- Username : "user" ,
162+ Username : sharedUtils . ToPtr ( "user" ) ,
162163 Signature : & signatureForRead ,
163164 SignatureExpiration : & readExpiration ,
164165 },
@@ -191,7 +192,7 @@ func TestDownloadWithHealthyToken(t *testing.T) {
191192 ctx ,
192193 & envdapi.GetFilesParams {
193194 Path : & filePath ,
194- Username : "user" ,
195+ Username : sharedUtils . ToPtr ( "user" ) ,
195196 Signature : & signatureForRead ,
196197 SignatureExpiration : & readExpiration ,
197198 },
@@ -224,7 +225,7 @@ func TestAccessWithNotCorrespondingSignatureAndSignatureExpiration(t *testing.T)
224225 ctx ,
225226 & envdapi.GetFilesParams {
226227 Path : & filePath ,
227- Username : "user" ,
228+ Username : sharedUtils . ToPtr ( "user" ) ,
228229 Signature : & signatureForRead ,
229230 SignatureExpiration : & readExpiration ,
230231 },
0 commit comments