MCPcopy Create free account
hub / github.com/cloudfoundry/cli / testSpacesFindByNameWithOrg

Function testSpacesFindByNameWithOrg

cf/api/spaces/spaces_test.go:350–442  ·  view source on GitHub ↗
(orgGUID string, findByName func(SpaceRepository, string) (models.Space, error))

Source from the content-addressed store, hash-verified

348})
349
350func testSpacesFindByNameWithOrg(orgGUID string, findByName func(SpaceRepository, string) (models.Space, error)) {
351 findSpaceByNameResponse := testnet.TestResponse{
352 Status: http.StatusOK,
353 Body: `
354{
355 "resources": [
356 {
357 "metadata": {
358 "guid": "space1-guid"
359 },
360 "entity": {
361 "name": "Space1",
362 "organization_guid": "org1-guid",
363 "organization": {
364 "metadata": {
365 "guid": "org1-guid"
366 },
367 "entity": {
368 "name": "Org1"
369 }
370 },
371 "apps": [
372 {
373 "metadata": {
374 "guid": "app1-guid"
375 },
376 "entity": {
377 "name": "app1"
378 }
379 },
380 {
381 "metadata": {
382 "guid": "app2-guid"
383 },
384 "entity": {
385 "name": "app2"
386 }
387 }
388 ],
389 "domains": [
390 {
391 "metadata": {
392 "guid": "domain1-guid"
393 },
394 "entity": {
395 "name": "domain1"
396 }
397 }
398 ],
399 "service_instances": [
400 {
401 "metadata": {
402 "guid": "service1-guid"
403 },
404 "entity": {
405 "name": "service1"
406 }
407 }

Callers 1

spaces_test.goFile · 0.85

Calls 4

createSpacesRepoFunction · 0.85
HaveAllRequestsCalledFunction · 0.85
CloseMethod · 0.65

Tested by

no test coverage detected