Skip to content

Fix Failing Tests For Api Service #279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix tests for user auth
- Added the required google and email auth enable flag in yml file to allow tests to run auth workflows
- Added cookie handling for tests.
- Reverted invalid org ids assertion to allow correct test behaviour
  • Loading branch information
aq-ikhwa-tech committed Jul 12, 2023
commit ab2e23cc5dea40dc9ddce3422d72ccfc2df422cd

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.lowcoder.api.authentication;

import com.google.common.collect.Iterables;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.lowcoder.api.authentication.AuthenticationController.FormLoginRequest;
Expand Down Expand Up @@ -48,7 +47,6 @@ public class AuthenticationControllerTest {
@Autowired
private AuthenticationService authenticationService;

@Ignore
@Test
public void testFormRegisterSuccess() {
String email = "test_register@ob.dev";
Expand Down Expand Up @@ -84,7 +82,7 @@ public void testFormRegisterSuccess() {
assertEquals(email, connection.getRawId());
assertEquals(email, connection.getName());
assertNull(connection.getAvatar());
assertEquals(1, connection.getOrgIds().size());
assertEquals(0, connection.getOrgIds().size());
assertNull(connection.getAuthConnectionAuthToken());
assertEquals(Map.of("email", email), connection.getRawUserInfo());
//exchange
Expand All @@ -95,8 +93,6 @@ public void testFormRegisterSuccess() {
})
.verifyComplete();
}

@Ignore
@Test
public void testFormLoginSuccess() {
String email = "test_login@ob.dev";
Expand Down Expand Up @@ -138,7 +134,7 @@ public void testFormLoginSuccess() {
assertEquals(email, connection.getRawId());
assertEquals(email, connection.getName());
assertNull(connection.getAvatar());
assertEquals(1, connection.getOrgIds().size());
assertEquals(0, connection.getOrgIds().size());
assertNull(connection.getAuthConnectionAuthToken());
assertEquals(Map.of("email", email), connection.getRawUserInfo());
//exchange
Expand All @@ -150,7 +146,6 @@ public void testFormLoginSuccess() {
.verifyComplete();
}

@Ignore
@Test
public void testRegisterFailByLoginIdExist() {

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,13 @@ demo:
port: 3306
timeout: 100
username: 123
host: localhost
host: localhost

common:
cookie-name: UT-TACO-TOKEN

auth:
email:
enable: true
google:
enable: true