Skip to content
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

Revert "Cicd/13 add to GitHub actions coverage tests on pull request" #16

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
47 changes: 6 additions & 41 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,6 @@
<artifactId>sj2324-seed</artifactId>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.12</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>jacoco-check</id>
<goals>
<goal>check</goal>
</goals>
<configuration>
<rules>
<rule>
<element>PACKAGE</element>
<limits>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.0</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>springdoc-openapi-maven-plugin</artifactId>
<executions>
Expand Down Expand Up @@ -116,6 +77,10 @@
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<groupId>org.springframework.boot</groupId>
</dependency>
<dependency>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<groupId>org.springframework.boot</groupId>
</dependency>
<dependency>
<artifactId>spring-boot-starter-web</artifactId>
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -166,7 +131,7 @@
<dependency>
<artifactId>postgresql</artifactId>
<groupId>org.testcontainers</groupId>
<scope>runtime</scope>
<scope>test</scope>
</dependency>
<dependency>
<artifactId>spring-boot-devtools</artifactId>
Expand All @@ -187,7 +152,7 @@
<artifactId>spring-boot-starter-parent</artifactId>
<groupId>org.springframework.boot</groupId>
<relativePath/>
<version>3.2.4</version> <!-- lookup parent from repository -->
<version>3.2.3</version> <!-- lookup parent from repository -->
</parent>
<properties>
<java.version>22</java.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

// implemented by MM
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Builder


@Embeddable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
package at.spengergasse.sj2324seedproject.domain;

import jakarta.persistence.Embeddable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.NoArgsConstructor;

@Builder


@Embeddable
public record Customer(String connectionNo) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,38 @@
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.data.jpa.domain.AbstractPersistable;

import java.util.List;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)


@Entity
@Builder
@Table(name = "producers")
@Entity
public class Producer extends AbstractPersistable<Long>{

/*
Relations
*/

@OneToMany(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST, CascadeType.MERGE})
private List<StorageObjectMeta> storageObjectMeta;


/*
Attributes
*/

@Column(name = "shortname", length = ConstantsDomain.DEFAULT_LENGTH)
@NotBlank
private String shortname;
private String shortname = ConstantsDomain.DEFAULT_VALUE;

@NotBlank
@Column(name = "producer_name", length = ConstantsDomain.DEFAULT_LENGTH)
private String name;
private String name = ConstantsDomain.DEFAULT_VALUE;



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@

@Data
@Builder
@Embeddable
@NoArgsConstructor
@AllArgsConstructor


@Embeddable
public class Profile {

private static final int USERNAME_LENGTH = 10;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,14 @@
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.data.jpa.domain.AbstractPersistable;

@Data
@Entity
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)


@Entity
@Table(name = "reservations")
public class Reservation extends AbstractPersistable<Long> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.data.jpa.domain.AbstractPersistable;

// Implementend by MM
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Builder

@Entity
@Table(name="storages")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,29 @@
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.data.jpa.domain.AbstractPersistable;

import java.util.ArrayList;
import java.util.List;

@Data
@Entity
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)


@Entity
@Table(name = "storage_objects")
public class StorageObject extends AbstractPersistable<Long>{

/*
Relations
*/


// @JoinColumn(name = "fk_stored_at_user", foreignKey = @ForeignKey(name = "fk_storageObject_2_user"))
// @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.MERGE, CascadeType.PERSIST})
@OneToMany
private List<User> storedAtUsers;
private List<User> storedAtUser = new ArrayList<>();

@ManyToOne(fetch = FetchType.LAZY,
cascade = {CascadeType.MERGE, CascadeType.PERSIST})
Expand Down Expand Up @@ -53,6 +56,9 @@ public class StorageObject extends AbstractPersistable<Long>{
cascade = {CascadeType.MERGE, CascadeType.PERSIST})
private Reservation reservation;

/*
Attributes
*/
@Column(name = "serial_number")
private String serialNumber;

Expand All @@ -62,7 +68,7 @@ public class StorageObject extends AbstractPersistable<Long>{

@Column(name = "remark")
@NotBlank
private String remark;
private String remark = ConstantsDomain.DEFAULT_VALUE;

@Column(name = "project_device")
private Boolean projectDevice;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,19 @@
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.data.jpa.domain.AbstractPersistable;

import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)

@Builder

@Entity
@Table(name ="storageObjectHistory")

public class StorageObjectHistory extends AbstractPersistable<Long> {

@ManyToOne(fetch = FetchType.LAZY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.data.jpa.domain.AbstractPersistable;

Expand All @@ -17,15 +16,18 @@


@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)

@Builder
@Entity
@Table(name = "storage_object_metas")

public class StorageObjectMeta extends AbstractPersistable<Long>{

/*
Relations
*/

@OneToMany(fetch = FetchType.LAZY, cascade = {CascadeType.MERGE, CascadeType.PERSIST})
public List<StorageObject> storageobject;

Expand All @@ -38,13 +40,17 @@ public class StorageObjectMeta extends AbstractPersistable<Long>{
@Enumerated(EnumType.STRING)
private Type type;

/*
Attributes
*/

@NotBlank
@Column(name = "storage_object_name")
private String name;
private String name = ConstantsDomain.DEFAULT_VALUE;

@NotBlank
@Column(name = "os_version")
private String osVersion;
private String osVersion = ConstantsDomain.DEFAULT_VALUE;

@Min(0)
@Column(name = "consumables_per_box")
Expand All @@ -56,11 +62,11 @@ public class StorageObjectMeta extends AbstractPersistable<Long>{

@NotBlank
@Column(name = "wave_length")
private String wavelength;
private String wavelength = ConstantsDomain.DEFAULT_VALUE;

@NotBlank
@Column(name = "interface_speed")
private String interfacespeed;
private String interfacespeed = ConstantsDomain.DEFAULT_VALUE;


}
18 changes: 15 additions & 3 deletions src/main/java/at/spengergasse/sj2324seedproject/domain/Type.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import lombok.Getter;

@Getter
@AllArgsConstructor
//@NoArgsConstructor
@AllArgsConstructor //Error wenn erzeugt -> java: Konstruktor Type() ist bereits in Enumeration at.spengergasse.sj23247abcif.domain.Type definiert
public enum Type{

IP_PHONE("IP Phone", "IPP"),
Expand All @@ -13,6 +14,17 @@ public enum Type{
SFP("Sfp", "Sfp"),
CONSUMABLES("Consumables", "Cs");

final private String longVersion;
final private String shortVersion;


private String longVersion;
private String shortVersion;

//public enum Type {
//
// IP_PHONE,
// ROUTER,
// SWITCH,
// SFP,
// CONSUMABLES
//
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,16 @@
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import org.springframework.data.jpa.domain.AbstractPersistable;
import org.springframework.format.annotation.DateTimeFormat;

@Data
@Entity
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)


@Entity
@Table(name = "app_user")
public class User extends AbstractPersistable<Long> {

Expand Down
Loading
Loading