refactor(cloudly): consume external api package
This commit is contained in:
@@ -2,8 +2,7 @@ import { tap, expect } from '@git.zone/tstest/tapbundle';
|
||||
import * as helpers from './helpers/index.js';
|
||||
|
||||
import * as cloudly from '../ts/index.js';
|
||||
import * as cloudlyApiClient from '../ts_apiclient/index.js';
|
||||
import { Image } from '../ts_apiclient/classes.image.js';
|
||||
import * as cloudlyApiClient from '@serve.zone/api';
|
||||
|
||||
let testCloudly: cloudly.Cloudly;
|
||||
let testClient: cloudlyApiClient.CloudlyApiClient;
|
||||
@@ -85,7 +84,7 @@ tap.test('should get an identity', async () => {
|
||||
}
|
||||
});
|
||||
|
||||
let image: Image;
|
||||
let image: any;
|
||||
tap.test('should create and upload an image', async () => {
|
||||
console.log('🔵 Test: Creating and uploading image...');
|
||||
console.log(` - Image name: 'test'`);
|
||||
@@ -99,7 +98,7 @@ tap.test('should create and upload an image', async () => {
|
||||
console.log('✅ Image created successfully:');
|
||||
console.log(` - Image ID: ${image?.id}`);
|
||||
console.log(` - Image data:`, image);
|
||||
expect(image).toBeInstanceOf(Image);
|
||||
expect(image).toBeTruthy();
|
||||
} catch (error) {
|
||||
console.error('❌ Failed to create image:');
|
||||
console.error(` - Error message: ${error.message}`);
|
||||
@@ -135,4 +134,4 @@ tap.test('should stop the apiclient', async (toolsArg) => {
|
||||
await testCloudly.stop();
|
||||
})
|
||||
|
||||
export default tap.start();
|
||||
export default tap.start();
|
||||
|
||||
Reference in New Issue
Block a user