Skip to content

Commit

Permalink
add mock to fix failing unit test
Browse files Browse the repository at this point in the history
Signed-off-by: instamenta <[email protected]>
  • Loading branch information
instamenta committed Dec 19, 2024
1 parent 7c63989 commit c91b8ab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/unit/commands/network.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import {ProfileManager} from '../../../src/core/profile_manager.js';
import {KeyManager} from '../../../src/core/key_manager.js';
import {ROOT_DIR} from '../../../src/core/constants.js';
import {ListrLease} from '../../../src/core/lease/listr_lease.js';
import {GenesisNetworkDataConstructor} from '../../../src/core/genesis_network_models/genesis_network_data_constructor.js';

const getBaseCommandOpts = () => ({
logger: sinon.stub(),
Expand Down Expand Up @@ -111,6 +112,8 @@ describe('NetworkCommand unit tests', () => {
opts.configManager = new ConfigManager(opts.logger);
opts.leaseManager = new LeaseManager(opts.k8, opts.configManager, opts.logger, new IntervalLeaseRenewalService());
opts.leaseManager.currentNamespace = sinon.stub().returns(testName);

GenesisNetworkDataConstructor.initialize = sinon.stub().returns(null);
});

it('Install function is called with expected parameters', async () => {
Expand Down

0 comments on commit c91b8ab

Please sign in to comment.