nvidia-container-toolkit/internal/logger/mock.go
Carlos Eduardo Arango Gutierrez 4930f680a4
[no-relnote] Create a Mock logger interfact to enable testing
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
2025-05-26 17:23:05 +02:00

47 lines
1.5 KiB
Go

/**
# Copyright (c) NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
**/
package logger
// MockLogger is a mock implementation of the logger.Interface
type MockLogger struct{}
// NewMockLogger returns a new mock logger
func NewMockLogger() *MockLogger {
return &MockLogger{}
}
// Debugf is a no-op for the mock logger
func (l *MockLogger) Debugf(format string, args ...interface{}) {}
// Errorf is a no-op for the mock logger
func (l *MockLogger) Errorf(format string, args ...interface{}) {}
// Info is a no-op for the mock logger
func (l *MockLogger) Info(args ...interface{}) {}
// Infof is a no-op for the mock logger
func (l *MockLogger) Infof(format string, args ...interface{}) {}
// Warning is a no-op for the mock logger
func (l *MockLogger) Warning(args ...interface{}) {}
// Warningf is a no-op for the mock logger
func (l *MockLogger) Warningf(format string, args ...interface{}) {}
// Tracef is a no-op for the mock logger
func (l *MockLogger) Tracef(format string, args ...interface{}) {}