Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Leviathan Utility helpers

The module contains helpers to better write tests.

Index

Namespaces

Properties

Properties

export=

export=: { createSSHKey: (keyPath: any) => any; executeCommandOverSSH: (command: string, config: any) => Promise<any>; waitUntil: (promise: string, rejectionFail?: boolean, _times?: number, _delay?: number) => Promise<void>; getFilesFromDirectory: any }

Type declaration

  • createSSHKey: (keyPath: any) => any
      • (keyPath: any): any
      • Parameters

        • keyPath: any

        Returns any

  • executeCommandOverSSH: (command: string, config: any) => Promise<any>
      • (command: string, config: any): Promise<any>
      • This is the base hostOS execution command used by many other functions like executeCommandIntoHostOs to execute commands on the DUT being passed through SSH.

        category

        helper

        Parameters

        • command: string

          The command to be executed over SSH

        • config: any

        Returns Promise<any>

  • waitUntil: (promise: string, rejectionFail?: boolean, _times?: number, _delay?: number) => Promise<void>
      • (promise: string, rejectionFail?: boolean, _times?: number, _delay?: number): Promise<void>
      • throws

        error on first iteration ifrejectionFail is true. Otherwise throws error after iterating through the specified _times parameter

        category

        helper

        Parameters

        • promise: string

          The command you need to wait for

        • rejectionFail: boolean = false

          Whether the waitUntil() function error out, if a iteration fails once. Defaults to false, which results in waitUntil() not failing as it iterates and wait for the condition to satisfy.

        • _times: number = 20

          Specify how many times should the command be executed

        • _delay: number = 30000

          Specify the delay between each iteration of the command execution

        Returns Promise<void>

  • getFilesFromDirectory: function
    • getFilesFromDirectory(basePath: any, ignore?: any[]): any

Generated using TypeDoc