Test fixes
This commit is contained in:
parent
f37bddbc6d
commit
e3bed0c636
14 changed files with 30 additions and 13 deletions
|
@ -838,7 +838,7 @@ return [
|
|||
'variables' => [
|
||||
[
|
||||
'name' => '_APP_GRAPHQL_MAX_BATCH_SIZE',
|
||||
'description' => 'Maximum number of batched queries per request. The default value is 50.',
|
||||
'description' => 'Maximum number of batched queries per request. The default value is 10.',
|
||||
'introduction' => '0.17.0',
|
||||
'default' => '10',
|
||||
'required' => false,
|
||||
|
@ -847,7 +847,7 @@ return [
|
|||
],
|
||||
[
|
||||
'name' => '_APP_GRAPHQL_MAX_COMPLEXITY',
|
||||
'description' => 'Maximum complexity of a GraphQL query. The default value is 200.',
|
||||
'description' => 'Maximum complexity of a GraphQL query. The default value is 50.',
|
||||
'introduction' => '0.17.0',
|
||||
'default' => '50',
|
||||
'required' => false,
|
||||
|
|
|
@ -32,7 +32,7 @@ class Resolvers
|
|||
|
||||
$path = $route->getPath();
|
||||
foreach ($args as $key => $value) {
|
||||
if (\str_contains($path, $key)) {
|
||||
if (\str_contains($path, '/:' . $key)) {
|
||||
$path = \str_replace(':' . $key, $value, $path);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -444,8 +444,8 @@ class GraphQLAccountTest extends Scope
|
|||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $graphQLPayload);
|
||||
|
||||
$this->assertIsNotArray($account['body']);
|
||||
$this->assertEquals(204, $account['headers']['status-code']);
|
||||
$this->assertEmpty($account['body']);
|
||||
|
||||
unset(self::$user[$this->getProject()['$id']]);
|
||||
$this->getUser();
|
||||
|
@ -469,6 +469,7 @@ class GraphQLAccountTest extends Scope
|
|||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $graphQLPayload);
|
||||
|
||||
$this->assertIsNotArray($account['body']);
|
||||
$this->assertEquals(204, $account['headers']['status-code']);
|
||||
|
||||
unset(self::$user[$this->getProject()['$id']]);
|
||||
|
|
|
@ -235,6 +235,7 @@ class GraphQLAuthTest extends Scope
|
|||
'cookie' => 'a_session_' . $projectId . '=' . $this->token1,
|
||||
], $gqlPayload);
|
||||
|
||||
$this->assertIsNotArray($document['body']);
|
||||
$this->assertEquals(204, $document['headers']['status-code']);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1057,8 +1057,8 @@ trait GraphQLBase
|
|||
}
|
||||
}';
|
||||
case self::$DELETE_TEAM_MEMBERSHIP:
|
||||
return 'mutation deleteTeamMembership($teamId: String!, $userId: String!){
|
||||
teamsDeleteMembership(teamId: $teamId, userId: $userId)
|
||||
return 'mutation deleteTeamMembership($teamId: String!, $membershipId: String!){
|
||||
teamsDeleteMembership(teamId: $teamId, membershipId: $membershipId)
|
||||
}';
|
||||
case self::$GET_FUNCTION:
|
||||
return 'query getFunction($functionId: String!) {
|
||||
|
|
|
@ -288,6 +288,7 @@ class GraphQLDatabaseClientTest extends Scope
|
|||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $gqlPayload);
|
||||
|
||||
$this->assertIsNotArray($document['body']);
|
||||
$this->assertEquals(204, $document['headers']['status-code']);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -843,6 +843,7 @@ class GraphQLDatabaseServerTest extends Scope
|
|||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $gqlPayload);
|
||||
|
||||
$this->assertIsNotArray($document['body']);
|
||||
$this->assertEquals(204, $document['headers']['status-code']);
|
||||
}
|
||||
|
||||
|
@ -871,6 +872,7 @@ class GraphQLDatabaseServerTest extends Scope
|
|||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $gqlPayload);
|
||||
|
||||
$this->assertIsNotArray($attribute['body']);
|
||||
$this->assertEquals(204, $attribute['headers']['status-code']);
|
||||
}
|
||||
|
||||
|
@ -895,6 +897,7 @@ class GraphQLDatabaseServerTest extends Scope
|
|||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $gqlPayload);
|
||||
|
||||
$this->assertIsNotArray($collection['body']);
|
||||
$this->assertEquals(204, $collection['headers']['status-code']);
|
||||
}
|
||||
|
||||
|
@ -918,6 +921,7 @@ class GraphQLDatabaseServerTest extends Scope
|
|||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $gqlPayload);
|
||||
|
||||
$this->assertIsNotArray($database['body']);
|
||||
$this->assertEquals(204, $database['headers']['status-code']);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -400,6 +400,7 @@ class GraphQLFunctionsServerTest extends Scope
|
|||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $gqlPayload);
|
||||
|
||||
$this->assertIsNotArray($response['body']);
|
||||
$this->assertEquals(204, $response['headers']['status-code']);
|
||||
}
|
||||
|
||||
|
@ -425,6 +426,7 @@ class GraphQLFunctionsServerTest extends Scope
|
|||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $gqlPayload);
|
||||
|
||||
$this->assertIsNotArray($response['body']);
|
||||
$this->assertEquals(204, $response['headers']['status-code']);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -258,7 +258,6 @@ class GraphQLStorageClientTest extends Scope
|
|||
/**
|
||||
* @depends testCreateFile
|
||||
* @param $file
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function testDeleteFile($file): void
|
||||
|
@ -278,6 +277,7 @@ class GraphQLStorageClientTest extends Scope
|
|||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $gqlPayload);
|
||||
|
||||
$this->assertEquals(200, $file['headers']['status-code']);
|
||||
$this->assertIsNotArray($file['body']);
|
||||
$this->assertEquals(204, $file['headers']['status-code']);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -358,7 +358,8 @@ class GraphQLStorageServerTest extends Scope
|
|||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $gqlPayload);
|
||||
|
||||
$this->assertEquals(200, $file['headers']['status-code']);
|
||||
$this->assertIsNotArray($file['body']);
|
||||
$this->assertEquals(204, $file['headers']['status-code']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -383,6 +384,7 @@ class GraphQLStorageServerTest extends Scope
|
|||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $gqlPayload);
|
||||
|
||||
$this->assertIsNotArray($bucket['body']);
|
||||
$this->assertEquals(204, $bucket['headers']['status-code']);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -183,6 +183,7 @@ class GraphQLTeamsClientTest extends Scope
|
|||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $graphQLPayload);
|
||||
|
||||
$this->assertEquals(200, $team['headers']['status-code']);
|
||||
$this->assertIsNotArray($team['body']);
|
||||
$this->assertEquals(204, $team['headers']['status-code']);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -236,7 +236,8 @@ class GraphQLTeamsServerTest extends Scope
|
|||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $graphQLPayload);
|
||||
|
||||
$this->assertEquals(200, $team['headers']['status-code']);
|
||||
$this->assertIsNotArray($team['body']);
|
||||
$this->assertEquals(204, $team['headers']['status-code']);
|
||||
}
|
||||
|
||||
public function testDeleteTeam()
|
||||
|
@ -257,6 +258,7 @@ class GraphQLTeamsServerTest extends Scope
|
|||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $graphQLPayload);
|
||||
|
||||
$this->assertEquals(200, $team['headers']['status-code']);
|
||||
$this->assertIsNotArray($team['body']);
|
||||
$this->assertEquals(204, $team['headers']['status-code']);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -372,6 +372,7 @@ class GraphQLUsersTest extends Scope
|
|||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $graphQLPayload);
|
||||
|
||||
$this->assertIsNotArray($user['body']);
|
||||
$this->assertEquals(204, $user['headers']['status-code']);
|
||||
|
||||
unset(self::$user[$this->getProject()['$id']]);
|
||||
|
@ -395,6 +396,7 @@ class GraphQLUsersTest extends Scope
|
|||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $graphQLPayload);
|
||||
|
||||
$this->assertIsNotArray($user['body']);
|
||||
$this->assertEquals(204, $user['headers']['status-code']);
|
||||
|
||||
unset(self::$user[$this->getProject()['$id']]);
|
||||
|
@ -417,6 +419,7 @@ class GraphQLUsersTest extends Scope
|
|||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $graphQLPayload);
|
||||
|
||||
$this->assertIsNotArray($user['body']);
|
||||
$this->assertEquals(204, $user['headers']['status-code']);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue