Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.withOperation("getKotsDownstreamHistory")
.withQuery(getKotsDownstreamHistoryRaw)
.withVariables({
clusterSlug: "kots-no-release-notes-cluster-slug",
upstreamSlug: "kots-no-release-notes-app-slug"
})
.willRespondWith({
status: 200,
headers: { "Content-Type": "application/json" },
body: {
data: {
getKotsDownstreamHistory: [
{
"title": "kots-no-release-notes-version-label",
"status": "pending",
"createdOn": Matchers.like("Fri Apr 19 2019 01:23:45 GMT+0000 (Coordinated Universal Time)"),
"sequence": 0,
"releaseNotes": "",
"deployedAt": Matchers.like("Fri Apr 19 2019 01:23:45 GMT+0000 (Coordinated Universal Time)"),
"preflightResult": null,
"preflightResultCreatedAt": null
}
],
},
},
});
};
.withOperation("getKotsDownstreamHistory")
.withQuery(getKotsDownstreamHistoryRaw)
.withVariables({
clusterSlug: "kots-release-notes-cluster-slug",
upstreamSlug: "kots-release-notes-app-slug"
})
.willRespondWith({
status: 200,
headers: { "Content-Type": "application/json" },
body: {
data: {
getKotsDownstreamHistory: [
{
"title": "my-other-awesome-version",
"status": "pending",
"createdOn": Matchers.like("Fri Apr 19 2019 01:23:45 GMT+0000 (Coordinated Universal Time)"),
"sequence": 0,
"releaseNotes": "# Release Notes Markdown Text",
"deployedAt": Matchers.like("Fri Apr 19 2019 01:23:45 GMT+0000 (Coordinated Universal Time)"),
"preflightResult": Matchers.like("string"),
"preflightResultCreatedAt": Matchers.like("Fri Apr 19 2019 01:23:45 GMT+0000 (Coordinated Universal Time)")
}
],
},
},
});
};
.withVariables({
watchId: "single-user-watch-update-1",
watchName: "Updated Single User Watch Update",
iconUri: "http://ccsuppliersource.com/wp-content/uploads/2018/12/bigstock_online_update_11303201.jpg"
})
.willRespondWith({
status: 200,
headers: { "Content-Type": "application/json" },
body: {
data: {
updateWatch: {
id: "single-user-watch-update-1",
slug: "single-user/single-user-watch-update-1",
watchName: "Updated Single User Watch Update",
watchIcon: "http://ccsuppliersource.com/wp-content/uploads/2018/12/bigstock_online_update_11303201.jpg",
createdOn: Matchers.like("2019-04-10 12:34:56.789"),
lastUpdated: Matchers.like("generated"),
stateJSON: Matchers.like("string"),
contributors: Matchers.like([{
avatar_url: "string",
createdAt: "0001-01-01T00:00:00Z",
githubId: 1234,
id: "string",
login: "string",
}])
},
},
},
});
upstreamSlug: "get-kots-downstream-history-app-slug"
})
.willRespondWith({
status: 200,
headers: { "Content-Type": "application/json" },
body: {
data: {
getKotsDownstreamHistory: [
{
title: "my-awesome-version",
status: "pending",
createdOn: Matchers.like("date"),
sequence: 0,
deployedAt: Matchers.like("date"),
preflightResult: Matchers.like("JSONPreflightResult"),
preflightResultCreatedAt: Matchers.like("date")
}
],
},
},
});
};
watchId: "single-user-watch-update-1",
watchName: "Updated Single User Watch Update",
iconUri: "http://ccsuppliersource.com/wp-content/uploads/2018/12/bigstock_online_update_11303201.jpg"
})
.willRespondWith({
status: 200,
headers: { "Content-Type": "application/json" },
body: {
data: {
updateWatch: {
id: "single-user-watch-update-1",
slug: "single-user/single-user-watch-update-1",
watchName: "Updated Single User Watch Update",
watchIcon: "http://ccsuppliersource.com/wp-content/uploads/2018/12/bigstock_online_update_11303201.jpg",
createdOn: Matchers.like("2019-04-10 12:34:56.789"),
lastUpdated: Matchers.like("generated"),
stateJSON: Matchers.like("string"),
contributors: Matchers.like([{
avatar_url: "string",
createdAt: "0001-01-01T00:00:00Z",
githubId: 1234,
id: "string",
login: "string",
}])
},
},
},
});
"id": "solo-account-cluster-1",
"title": "Solo Cluster",
"slug": "solo-cluster",
"totalApplicationCount": 1,
"createdOn": Matchers.like("2019-04-10 12:34:56.789"),
"lastUpdated": Matchers.like("2019-04-11 01:23:45.567"),
"shipOpsRef": {
"token": "solo-account-cluster-token",
},
},
{
"id": "solo-account-cluster-2",
"title": "Solo GitHub Cluster",
"slug": "solo-cluster-2",
"totalApplicationCount": 0,
"createdOn": Matchers.like("2019-04-10 12:34:56.789"),
"lastUpdated": Matchers.like("2019-04-11 01:23:45.567"),
"shipOpsRef": null,
},
{
"id": Matchers.like("l9cpydvcf30ekf25pmokwn6qlnxscrci"),
"title": "this-cluster",
"slug": "this-cluster",
"createdOn": Matchers.like("Wed Jan 22 2020 00:34:12 GMT+0000 (Coordinated Universal Time)"),
"lastUpdated": null,
"shipOpsRef": {
"token": Matchers.like("g7yoarinjpaft3si5z1h5de1uam443bb")
},
"totalApplicationCount": 0
}
]
}
iconUri: "http://ccsuppliersource.com/wp-content/uploads/2018/12/bigstock_online_update_11303201.jpg"
})
.willRespondWith({
status: 200,
headers: { "Content-Type": "application/json" },
body: {
data: {
updateWatch: {
id: "single-user-watch-update-1",
slug: "single-user/single-user-watch-update-1",
watchName: "Updated Single User Watch Update",
watchIcon: "http://ccsuppliersource.com/wp-content/uploads/2018/12/bigstock_online_update_11303201.jpg",
createdOn: Matchers.like("2019-04-10 12:34:56.789"),
lastUpdated: Matchers.like("generated"),
stateJSON: Matchers.like("string"),
contributors: Matchers.like([{
avatar_url: "string",
createdAt: "0001-01-01T00:00:00Z",
githubId: 1234,
id: "string",
login: "string",
}])
},
},
},
});
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: {
email: "test-ship-auth-signup@gmail.com",
firstName: "First",
lastName: "Last",
password: "password",
},
})
.willRespondWith({
status: 200,
headers: { "Content-Type": "application/json" },
body: {
token: Matchers.like("generated"),
signup: {
email: "test-ship-auth-signup@gmail.com",
id: Matchers.like("generated"),
},
}
});
})
.withOperation("createInitSession")
.withQuery(createInitSessionRaw)
.withVariables({
pendingInitId: "",
upstreamUri: "https://github.com/helm/charts/stable/grafana",
clusterID: null,
githubPath: null,
})
.willRespondWith({
status: 200,
headers: { "Content-Type": "application/json" },
body: {
data: {
createInitSession: {
id: Matchers.like("generated"),
upstreamUri: "https://github.com/helm/charts/stable/grafana",
createdOn: Matchers.like("generated"),
},
},
},
});
"id": "solo-account-cluster-2",
"title": "Solo GitHub Cluster",
"slug": "solo-cluster-2",
"totalApplicationCount": 0,
"createdOn": Matchers.like("2019-04-10 12:34:56.789"),
"lastUpdated": Matchers.like("2019-04-11 01:23:45.567"),
"shipOpsRef": null,
},
{
"id": Matchers.like("l9cpydvcf30ekf25pmokwn6qlnxscrci"),
"title": "this-cluster",
"slug": "this-cluster",
"createdOn": Matchers.like("Wed Jan 22 2020 00:34:12 GMT+0000 (Coordinated Universal Time)"),
"lastUpdated": null,
"shipOpsRef": {
"token": Matchers.like("g7yoarinjpaft3si5z1h5de1uam443bb")
},
"totalApplicationCount": 0
}
]
}
}
});