V2 Wizard: Fix snapshot_date field
The snapshot_date in the image_request must be a date. snapshot_date is an optional field and if no snapshot is used, the field should be undefined. Previously it was an empty string and this caused image builder to return a code 400 with message "Snapshot date is not in DateOnly (yyyy-mm-dd) format".
This commit is contained in:
parent
7246cfbd16
commit
bb91840eef
6 changed files with 1 additions and 10 deletions
|
|
@ -79,7 +79,6 @@ describe('registration request generated correctly', () => {
|
|||
const imageRequest: ImageRequest = {
|
||||
architecture: 'x86_64',
|
||||
image_type: 'image-installer',
|
||||
snapshot_date: '',
|
||||
upload_request: {
|
||||
options: {},
|
||||
type: 'aws.s3',
|
||||
|
|
|
|||
|
|
@ -94,7 +94,6 @@ describe('aws image type request generated correctly', () => {
|
|||
const expectedImageRequest: ImageRequest = {
|
||||
architecture: 'x86_64',
|
||||
image_type: 'aws',
|
||||
snapshot_date: '',
|
||||
upload_request: {
|
||||
options: {
|
||||
share_with_sources: ['123'],
|
||||
|
|
@ -121,7 +120,6 @@ describe('aws image type request generated correctly', () => {
|
|||
const expectedImageRequest: ImageRequest = {
|
||||
architecture: 'x86_64',
|
||||
image_type: 'aws',
|
||||
snapshot_date: '',
|
||||
upload_request: {
|
||||
options: {
|
||||
share_with_accounts: ['123123123123'],
|
||||
|
|
|
|||
|
|
@ -121,7 +121,6 @@ describe('azure image type request generated correctly', () => {
|
|||
const expectedImageRequest: ImageRequest = {
|
||||
architecture: 'x86_64',
|
||||
image_type: 'azure',
|
||||
snapshot_date: '',
|
||||
upload_request: {
|
||||
options: {
|
||||
source_id: '666',
|
||||
|
|
@ -152,7 +151,6 @@ describe('azure image type request generated correctly', () => {
|
|||
const expectedImageRequest: ImageRequest = {
|
||||
architecture: 'x86_64',
|
||||
image_type: 'azure',
|
||||
snapshot_date: '',
|
||||
upload_request: {
|
||||
type: 'azure',
|
||||
options: {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ const routes = [
|
|||
export const imageRequest: ImageRequest = {
|
||||
architecture: 'x86_64',
|
||||
image_type: 'image-installer',
|
||||
snapshot_date: '',
|
||||
upload_request: {
|
||||
options: {},
|
||||
type: 'aws.s3',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue