Skip to content

Commit

Permalink
Fix bug which set zero all resources in a wrong way.
Browse files Browse the repository at this point in the history
Added debug mode in test environment.
  • Loading branch information
giuse2596 committed Jul 29, 2021
1 parent 7bc8200 commit 01ecc61
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/resource-request-operator/broadcaster.go
Expand Up @@ -286,7 +286,7 @@ func (b *Broadcaster) writePodResources(clusterID string, newResources corev1.Re
if clusterID == "" {
return
}
if errorsmanagement.Must(checkSign(newResources)) {
if !errorsmanagement.Must(checkSign(newResources)) {
setZero(&newResources)
}
b.podMutex.Lock()
Expand Down
2 changes: 2 additions & 0 deletions internal/resource-request-operator/suite_test.go
Expand Up @@ -21,6 +21,7 @@ import (
discoveryv1alpha1 "github.com/liqotech/liqo/apis/discovery/v1alpha1"
sharingv1alpha1 "github.com/liqotech/liqo/apis/sharing/v1alpha1"
"github.com/liqotech/liqo/pkg/clusterid"
errorsmanagement "github.com/liqotech/liqo/pkg/utils/errorsManagement"
)

var (
Expand Down Expand Up @@ -70,6 +71,7 @@ func createCluster() {
MetricsBindAddress: "0", // this avoids port binding collision
})
Expect(err).ToNot(HaveOccurred())
errorsmanagement.SetDebug(true)
clientset = kubernetes.NewForConfigOrDie(k8sManager.GetConfig())
homeClusterID = clusterid.NewStaticClusterID("test-cluster").GetClusterID()
updater := OfferUpdater{}
Expand Down
5 changes: 3 additions & 2 deletions pkg/liqonet/ipam/ipam.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/liqonet/ipam/ipam_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 01ecc61

Please sign in to comment.