Skip to content

Commit 37efee3

Browse files
committed
Schema tests fail as they rely on magic IDs that are different in each rally subscription. Move these to test configs (keeping the existing value as the default config value)
1 parent 06f6e60 commit 37efee3

4 files changed

Lines changed: 35 additions & 4 deletions

File tree

Rally.RestApi.Test/CachedRequestTest.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System;
55
using System.Collections.Generic;
66
using System.Net;
7+
using Rally.RestApi.Test.Properties;
78

89
namespace Rally.RestApi.Test
910
{
@@ -23,7 +24,7 @@ public void QuerySchemaEndpointForWorkspaceTest()
2324
{
2425
RallyRestApi restApi = RallyRestApiTest.GetRallyRestApi(wsapiVersion: "v2.0");
2526
CookieAwareCacheableWebClient.ClearOldCacheFilesFromDisk(true);
26-
long oid = 14949797488;
27+
long oid = Settings.Default.WorkspaceOID;
2728

2829
CacheableQueryResult results = restApi.GetTypes(String.Format("/workspace/{0}", oid));
2930
Assert.IsNotNull(results);
@@ -39,7 +40,7 @@ public void QuerySchemaEndpointForSchemaTest()
3940
{
4041
RallyRestApi restApi = RallyRestApiTest.GetRallyRestApi(wsapiVersion: "v2.0");
4142
CookieAwareCacheableWebClient.ClearOldCacheFilesFromDisk(true);
42-
long oid = 1155237251;
43+
long oid = Settings.Default.ProjectOID;
4344

4445
CacheableQueryResult results = restApi.GetTypes(String.Format("/schema/{0}", oid));
4546
Assert.IsNotNull(results);

Rally.RestApi.Test/Properties/Settings.Designer.cs

Lines changed: 20 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Rally.RestApi.Test/Properties/Settings.settings

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,11 @@
1414
<Setting Name="ApiKey" Type="System.String" Scope="Application">
1515
<Value Profile="(Default)" />
1616
</Setting>
17+
<Setting Name="WorkspaceOID" Type="System.Int64" Scope="Application">
18+
<Value Profile="(Default)">14949797488</Value>
19+
</Setting>
20+
<Setting Name="ProjectOID" Type="System.Int64" Scope="Application">
21+
<Value Profile="(Default)">1155237251</Value>
22+
</Setting>
1723
</Settings>
1824
</SettingsFile>

Rally.RestApi.Test/app.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
<setting name="ApiKey" serializeAs="String">
2020
<value/>
2121
</setting>
22+
<setting name="WorkspaceOID" serializeAs="String">
23+
<value>14949797488</value>
24+
</setting>
25+
<setting name="ProjectOID" serializeAs="String">
26+
<value>1155237251</value>
27+
</setting>
2228
</Rally.RestApi.Test.Properties.Settings>
2329
</applicationSettings>
2430
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>

0 commit comments

Comments
 (0)