@@ -3,7 +3,7 @@ import { ReleaseChart, exportedForTesting, KotsSingleSpec, createReleaseFromChar
33import * as mockttp from "mockttp" ;
44import * as fs from "fs-extra" ;
55import * as path from "path" ;
6- import { sl } from "date-fns/locale " ;
6+ import { gzip } from "pako " ;
77
88const areReleaseChartsPushed = exportedForTesting . areReleaseChartsPushed ;
99const getReleaseByAppId = exportedForTesting . getReleaseByAppId ;
@@ -23,7 +23,12 @@ describe("Promote Release", () => {
2323 uponReceiving : "a request for promoting a release" ,
2424 withRequest : {
2525 method : "POST" ,
26- path : "/app/1234abcd/release/1/promote"
26+ path : "/app/1234abcd/release/1/promote" ,
27+ body : {
28+ versionLabel : "v1.0.0" ,
29+ channelIds : [ "channelid" ] ,
30+ releaseNotesGzip : Buffer . from ( gzip ( JSON . stringify ( "release notes" ) ) ) . toString ( "base64" )
31+ }
2732 } ,
2833 willRespondWith : {
2934 status : 200 ,
@@ -35,7 +40,7 @@ describe("Promote Release", () => {
3540 apiClient . apiToken = "abcd1234" ;
3641 apiClient . endpoint = globalThis . provider . mockService . baseUrl ;
3742
38- return promoteReleaseByAppId ( apiClient , "1234abcd" , "channelid" , 1 , "v1.0.0" )
43+ return promoteReleaseByAppId ( apiClient , "1234abcd" , "channelid" , 1 , "v1.0.0" , "release notes" )
3944 . then ( ( ) => {
4045 expect ( true ) . toEqual ( true ) ;
4146 } )
0 commit comments