Skip to content

Commit

Permalink
Fix go test cases issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
jigar-f committed Dec 2, 2024
1 parent ebc6743 commit 3392d30
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 19 deletions.
49 changes: 30 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,29 +411,21 @@ interaction with the native layer and offers an extensive set of easy-to-use tes
* Make sure you install patrol_cli globally by running `flutter pub global activate patrol_cli`
* Make sure to connect any device or emulator to run the test.

To run all integration the test on mobile
##### Run Test on Mobile

```sh
make appWorkflowTest
```
> Note: Integration for IOS is not supported at the moment.
To run and single test on mobile

```sh
make runTest testfile or make runTest integration_test/app_startup_flow_test.dart
```
To run all integration the test on Android

To run all integration the test on desktop

```sh
make desktopWorkflowTest
```_sh
make appWorkflowTest
```

To run and single test on desktop
You need pass DEVICE=macOS or DEVICE=windows or DEVICE=linux
To run a single test on a mobile

```sh
make integration_test/app_startup_flow_test.dart DEVICE=macOD
```_sh
make runTest [file_test].dart // Replace testfile with real file
make runTest integration_test/app_startup_flow_test.dart
```

#### Running Test on Firebase Test Lab
Expand All @@ -447,11 +439,30 @@ make integration_test/app_startup_flow_test.dart DEVICE=macOD

#### Running the test

To Run test on android device on Firebase Test Lab, you need to run the following command:
To Run a test on Android device on Firebase Test Lab, you need to run the following command:

```sh
```_sh
make ci-android-test
```
> Note-: If you want to customize which device you want to use change it [here](https://github.com/getlantern/lantern-client/blob/ebc6743840fa3ac5ef82c3d42eee508a2306fd7a/integration_test/run_android_testlabs.sh#L7)
##### Run Test on Desktop

> Note: Do not use direct patrol for dekstop there are some workaround that we need to do to run the test
To run all integration the test on desktop

```_sh
make maOSWorkflowTest // For macOS
make linuxDesktopTest // For Linux
make windowsDesktopTest // For Windows
```

To run a single test on a desktop, you need to pass DEVICE=macOS or DEVICE=windows or DEVICE=linux

```_sh
make integration_test/app_startup_flow_test.dart DEVICE=macOS
```

#### Testing Replica

Expand Down
1 change: 1 addition & 0 deletions internalsdk/user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func TestCreateUser_Failure(t *testing.T) {
mockSession := new(mocks.Session)

mockProClient.On("UserCreate", mock.Anything).Return(nil, errors.New("failed to create user"))
mockSession.On("GetUserData", int64(123)).Return(nil)

err := createUser(context.Background(), mockProClient, mockSession)
assert.Error(t, err, "expected an error")
Expand Down

0 comments on commit 3392d30

Please sign in to comment.