Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 1 addition & 11 deletions starter/cloudstorage/src/main/resources/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,6 @@ CREATE TABLE IF NOT EXISTS FILES (
contenttype VARCHAR,
filesize VARCHAR,
userid INT,
filedata BLOB,
foreign key (userid) references USERS(userid)
);

CREATE TABLE IF NOT EXISTS CREDENTIALS (
credentialid serial PRIMARY KEY,
url VARCHAR(100),
username VARCHAR (30),
key VARCHAR,
password VARCHAR,
userid INT,
filedata BYTEA,
foreign key (userid) references USERS(userid)
);
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.boot.test.web.server.LocalServerPort;

import java.io.File;
import java.time.Duration;
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
class CloudStorageApplicationTests {

Expand Down Expand Up @@ -52,7 +53,7 @@ private void doMockSignUp(String firstName, String lastName, String userName, St
// Create a dummy account for logging in later.

// Visit the sign-up page.
WebDriverWait webDriverWait = new WebDriverWait(driver, 2);
WebDriverWait webDriverWait = new WebDriverWait(driver, Duration.ofSeconds(2));
driver.get("http://localhost:" + this.port + "/signup");
webDriverWait.until(ExpectedConditions.titleContains("Sign Up"));

Expand Down Expand Up @@ -99,7 +100,7 @@ private void doLogIn(String userName, String password)
{
// Log in to our dummy account.
driver.get("http://localhost:" + this.port + "/login");
WebDriverWait webDriverWait = new WebDriverWait(driver, 2);
WebDriverWait webDriverWait = new WebDriverWait(driver, Duration.ofSeconds(2));

webDriverWait.until(ExpectedConditions.visibilityOfElementLocated(By.id("inputUsername")));
WebElement loginUserName = driver.findElement(By.id("inputUsername"));
Expand Down Expand Up @@ -182,7 +183,7 @@ public void testLargeUpload() {
doLogIn("LFT", "123");

// Try to upload an arbitrary large file
WebDriverWait webDriverWait = new WebDriverWait(driver, 2);
WebDriverWait webDriverWait = new WebDriverWait(driver, Duration.ofSeconds(2));
String fileName = "upload5m.zip";

webDriverWait.until(ExpectedConditions.visibilityOfElementLocated(By.id("fileUpload")));
Expand Down