Skip to content

Commit 43f62bd

Browse files
debug conflict in CI
1 parent 361d86f commit 43f62bd

File tree

4 files changed

+52
-52
lines changed

4 files changed

+52
-52
lines changed

.drone.star

+26-32
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ OCIS_FED_DOMAIN = "%s:10200" % FED_OCIS_SERVER_NAME
6969
# configuration
7070
config = {
7171
"cs3ApiTests": {
72-
"skip": False,
72+
"skip": True,
7373
},
7474
"wopiValidatorTests": {
75-
"skip": False,
75+
"skip": True,
7676
},
7777
"k6LoadTests": {
78-
"skip": False,
78+
"skip": True,
7979
},
8080
"localApiTests": {
8181
"basic": {
@@ -89,76 +89,76 @@ config = {
8989
"apiLocks",
9090
"apiActivities",
9191
],
92-
"skip": False,
92+
"skip": True,
9393
},
9494
"graph": {
9595
"suites": [
9696
"apiGraph",
9797
"apiServiceAvailability",
9898
],
99-
"skip": False,
99+
"skip": True,
100100
"withRemotePhp": [True],
101101
},
102102
"graphUserGroup": {
103103
"suites": [
104104
"apiGraphUserGroup",
105105
],
106-
"skip": False,
106+
"skip": True,
107107
"withRemotePhp": [True],
108108
},
109109
"spaces": {
110110
"suites": [
111111
"apiSpaces",
112112
],
113-
"skip": False,
113+
"skip": True,
114114
},
115115
"spacesShares": {
116116
"suites": [
117117
"apiSpacesShares",
118118
],
119-
"skip": False,
119+
"skip": True,
120120
},
121121
"spacesDavOperation": {
122122
"suites": [
123123
"apiSpacesDavOperation",
124124
],
125-
"skip": False,
125+
"skip": True,
126126
},
127127
"search1": {
128128
"suites": [
129129
"apiSearch1",
130130
],
131-
"skip": False,
131+
"skip": True,
132132
},
133133
"search2": {
134134
"suites": [
135135
"apiSearch2",
136136
],
137-
"skip": False,
137+
"skip": True,
138138
},
139139
"sharingNg": {
140140
"suites": [
141141
"apiReshare",
142142
"apiSharingNg1",
143143
"apiSharingNg2",
144144
],
145-
"skip": False,
145+
"skip": True,
146146
},
147147
"sharingNgShareInvitation": {
148148
"suites": [
149149
"apiSharingNgShareInvitation",
150150
],
151-
"skip": False,
151+
"skip": True,
152152
},
153153
"sharingNgLinkShare": {
154154
"suites": [
155155
"apiSharingNgLinkSharePermission",
156156
"apiSharingNgLinkShareRoot",
157157
],
158-
"skip": False,
158+
"skip": True,
159159
},
160160
"accountsHashDifficulty": {
161-
"skip": False,
161+
"skip": True,
162162
"suites": [
163163
"apiAccountsHashDifficulty",
164164
],
@@ -168,7 +168,7 @@ config = {
168168
"suites": [
169169
"apiNotification",
170170
],
171-
"skip": False,
171+
"skip": True,
172172
"withRemotePhp": [True],
173173
"emailNeeded": True,
174174
"extraEnvironment": {
@@ -188,7 +188,7 @@ config = {
188188
"suites": [
189189
"apiAntivirus",
190190
],
191-
"skip": False,
191+
"skip": True,
192192
"antivirusNeeded": True,
193193
"extraServerEnvironment": {
194194
"ANTIVIRUS_SCANNER_TYPE": "clamav",
@@ -203,14 +203,14 @@ config = {
203203
"suites": [
204204
"apiSearchContent",
205205
],
206-
"skip": False,
206+
"skip": True,
207207
"tikaNeeded": True,
208208
},
209209
"ocm": {
210210
"suites": [
211211
"apiOcm",
212212
],
213-
"skip": False,
213+
"skip": True,
214214
"withRemotePhp": [True],
215215
"federationServer": True,
216216
"emailNeeded": True,
@@ -236,7 +236,7 @@ config = {
236236
"suites": [
237237
"apiCollaboration",
238238
],
239-
"skip": False,
239+
"skip": True,
240240
"collaborationServiceNeeded": True,
241241
"extraServerEnvironment": {
242242
"GATEWAY_GRPC_ADDR": "0.0.0.0:9142",
@@ -246,7 +246,7 @@ config = {
246246
"suites": [
247247
"apiAuthApp",
248248
],
249-
"skip": False,
249+
"skip": True,
250250
"withRemotePhp": [True],
251251
"extraServerEnvironment": {
252252
"OCIS_ADD_RUN_SERVICES": "auth-app",
@@ -270,24 +270,24 @@ config = {
270270
},
271271
"apiTests": {
272272
"numberOfParts": 7,
273-
"skip": False,
273+
"skip": True,
274274
"skipExceptParts": [],
275275
},
276276
"e2eTests": {
277277
"part": {
278-
"skip": False,
278+
"skip": True,
279279
"totalParts": 4, # divide and run all suites in parts (divide pipelines)
280280
"xsuites": ["search", "app-provider", "oidc", "ocm"], # suites to skip
281281
},
282282
"search": {
283-
"skip": False,
283+
"skip": True,
284284
"suites": ["search"], # suites to run
285285
"tikaNeeded": True,
286286
},
287287
},
288288
"e2eMultiService": {
289289
"testSuites": {
290-
"skip": False,
290+
"skip": True,
291291
"suites": [
292292
"smoke",
293293
"shares",
@@ -401,15 +401,9 @@ def main(ctx):
401401
licenseCheck(ctx)
402402

403403
test_pipelines = \
404-
codestyle(ctx) + \
405-
checkGherkinLint(ctx) + \
406-
checkTestSuitesInExpectedFailures(ctx) + \
407404
buildWebCache(ctx) + \
408405
getGoBinForTesting(ctx) + \
409406
buildOcisBinaryForTesting(ctx) + \
410-
checkStarlark() + \
411-
build_release_helpers + \
412-
testOcisAndUploadResults(ctx) + \
413407
testPipelines(ctx)
414408

415409
build_release_pipelines = \
@@ -423,7 +417,7 @@ def main(ctx):
423417
),
424418
)
425419

426-
pipelines = test_pipelines + build_release_pipelines
420+
pipelines = test_pipelines
427421

428422
if ctx.build.event == "cron":
429423
pipelines = \

tests/acceptance/bootstrap/CliContext.php

+2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public function before(BeforeScenarioScope $scope): void {
5858
*/
5959
public function theAdministratorHasStoppedTheServer(): void {
6060
$response = OcisConfigHelper::stopOcis();
61+
var_dump($response->getBody());
6162
$this->featureContext->theHTTPStatusCodeShouldBe(200, '', $response);
6263
}
6364

@@ -68,6 +69,7 @@ public function theAdministratorHasStoppedTheServer(): void {
6869
*/
6970
public function theAdministratorHasStartedTheServer(): void {
7071
$response = OcisConfigHelper::startOcis();
72+
var_dump($response->getBody());
7173
$this->featureContext->theHTTPStatusCodeShouldBe(200, '', $response);
7274
}
7375

tests/ociswrapper/ocis/ocis.go

+16-12
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var EnvConfigs = []string{}
2929
var runningServices = make(map[string]int)
3030

3131
func Start(envMap []string) {
32-
StartService("", envMap)
32+
StartService("", envMap)
3333
}
3434

3535
func Stop() (bool, string) {
@@ -57,10 +57,11 @@ func Restart(envMap []string) (bool, string) {
5757
}
5858

5959
func IsOcisRunning() bool {
60-
if runningServices["ocis"] > 0 {
60+
log.Println(fmt.Sprintf("Check Ocis process id %d", runningServices["ocis"]))
61+
if runningServices["ocis"] > 0 {
6162
return true
62-
}
63-
return false
63+
}
64+
return false
6465
}
6566

6667
func waitAllServices(startTime time.Time, timeout time.Duration) {
@@ -141,6 +142,7 @@ func waitUntilCompleteShutdown() (bool, string) {
141142
return false, "Timeout waiting for oCIS server to stop"
142143
}
143144
}
145+
log.Println(fmt.Sprintf("oCIS server stopped successfully check by command %v", c))
144146
return true, "oCIS server stopped successfully"
145147
}
146148

@@ -189,7 +191,7 @@ func RunOcisService(service string, envMap []string) {
189191

190192
// startService is a common function for starting a service (ocis or other)
191193
func StartService(service string, envMap []string) {
192-
log.Println(fmt.Sprintf("Start service: %s with Environment variable envMap: %s\n", service, envMap))
194+
log.Println(fmt.Sprintf("Ocis start service %s with Environment variable envMap: %s\n", service, envMap))
193195
// Initialize command args based on service presence
194196
cmdArgs := []string{"server"} // Default command args
195197

@@ -239,7 +241,7 @@ func StartService(service string, envMap []string) {
239241
}
240242

241243
for listservice, pid := range runningServices {
242-
log.Println(fmt.Sprintf("Service started: %s with process and id: %v\n", listservice, pid))
244+
log.Println(fmt.Sprintf("%s runs on process id: %v\n", listservice, pid))
243245
}
244246

245247
// Read the logs when the 'ocis server' command is running
@@ -296,6 +298,8 @@ func StartService(service string, envMap []string) {
296298
// Stop oCIS service or a specific service by its unique identifier
297299
func StopService(service string) (bool, string) {
298300
pid, exists := runningServices[service]
301+
//log.Println(fmt.Sprintf("Stopping service %s with process id %v", service, pid))
302+
299303
if !exists {
300304
return false, fmt.Sprintf("Service %s is not running", service)
301305
}
@@ -310,13 +314,13 @@ func StopService(service string) (bool, string) {
310314
return false, fmt.Sprintf("Failed to stop service with process id %d", pid)
311315
}
312316

313-
_, waitErr := process.Wait()
314-
if waitErr != nil {
315-
return false, fmt.Sprintf("Error waiting for process to exit: %v\n", waitErr)
316-
}
317+
_, waitErr := process.Wait()
318+
if waitErr != nil {
319+
return false, fmt.Sprintf("Error waiting for process to exit: %v\n", waitErr)
320+
}
317321
delete(runningServices, service)
318-
322+
log.Println(fmt.Sprintf("Stopped service has been removed from runningServices so no pid %v", runningServices[service]))
319323
// service takes 30s time to sync
320-
time.Sleep(30 * time.Second)
324+
time.Sleep(30 * time.Second)
321325
return true, fmt.Sprintf("Service %s stopped successfully", service)
322326
}

tests/ociswrapper/wrapper/handlers/handler.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func StopOcisHandler(res http.ResponseWriter, req *http.Request) {
131131
sendResponse(res, http.StatusMethodNotAllowed, "")
132132
return
133133
}
134-
134+
log.Println("Stop api has been triggered")
135135
success, message := ocis.Stop()
136136
if success {
137137
sendResponse(res, http.StatusOK, message)
@@ -231,16 +231,16 @@ func OcisServiceHandler(res http.ResponseWriter, req *http.Request) {
231231
var envMap []string
232232

233233
if req.Body != nil && req.ContentLength > 0 {
234-
var err error
235-
envBody, err = parseJsonBody(req.Body)
236-
if err != nil {
237-
sendResponse(res, http.StatusBadRequest, "Invalid json body")
238-
return
239-
}
234+
var err error
235+
envBody, err = parseJsonBody(req.Body)
236+
if err != nil {
237+
sendResponse(res, http.StatusBadRequest, "Invalid json body")
238+
return
239+
}
240240
}
241241

242242
for key, value := range envBody {
243-
envMap = append(envMap, fmt.Sprintf("%s=%v", key, value))
243+
envMap = append(envMap, fmt.Sprintf("%s=%v", key, value))
244244
}
245245

246246
log.Println(fmt.Sprintf("serviceName to start: %s\n", serviceName))

0 commit comments

Comments
 (0)